/* Fun Zone Feedback Modal - HR's Nightmare Edition */

/* Modal Overlay */
.feedback-modal-overlay.funzone-edition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.feedback-modal-overlay.modal-open {
    opacity: 1;
    visibility: visible;
}

.feedback-modal-overlay.modal-closing {
    opacity: 0;
    visibility: hidden;
}

/* Modal Content - HR Desk Theme */
.feedback-modal-content.hr-desk {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 20px;
    max-width: 900px; /* Increased from 700px for wider layout */
    width: 90%; /* Use percentage for better responsiveness */
    max-height: 85vh; /* Limit height to 85% of viewport for better spacing */
    position: relative;
    animation: modalSlideIn 0.4s ease-out;
    border: 3px solid #8B7355;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(139, 115, 85, 0.1);
    overflow-y: auto; /* Changed from hidden to auto for scrolling */
    overflow-x: hidden;
    color: #333;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Feedback Modal */
.feedback-modal-content.hr-desk::-webkit-scrollbar {
    width: 10px;
}

.feedback-modal-content.hr-desk::-webkit-scrollbar-track {
    background: rgba(139, 115, 85, 0.1);
    border-radius: 10px;
}

.feedback-modal-content.hr-desk::-webkit-scrollbar-thumb {
    background: #8B7355;
    border-radius: 10px;
}

.feedback-modal-content.hr-desk::-webkit-scrollbar-thumb:hover {
    background: #654321;
}

/* HR Desk Scene */
.hr-desk-scene {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 150px;
    background: linear-gradient(135deg, #8B7355 0%, #654321 100%);
    border-bottom-left-radius: 20px;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.desk-nameplate {
    background: #FFD700;
    color: #000;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    border: 2px solid #B8860B;
    margin-bottom: 10px;
}

.incoming-pile {
    position: relative;
    height: 80px;
    perspective: 500px;
}

.pile-folder {
    position: absolute;
    background: #F4E4C1;
    border: 1px solid #8B7355;
    padding: 3px 8px;
    font-size: 9px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform-origin: bottom center;
}

.folder-1 { bottom: 0; left: 10px; transform: rotate(-5deg); z-index: 1; }
.folder-2 { bottom: 5px; left: 15px; transform: rotate(3deg); z-index: 2; }
.folder-3 { bottom: 10px; left: 12px; transform: rotate(-2deg); z-index: 3; }
.folder-4 { bottom: 15px; left: 18px; transform: rotate(4deg); z-index: 4; }
.folder-5 { bottom: 20px; left: 10px; transform: rotate(-3deg); z-index: 5; }

.coffee-stain {
    position: absolute;
    bottom: 10px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: radial-gradient(ellipse, rgba(139, 69, 19, 0.3) 0%, transparent 70%);
    border-radius: 50%;
}

.rubber-stamp {
    position: absolute;
    bottom: 30px;
    right: 60px;
    color: #DC143C;
    font-weight: bold;
    font-size: 14px;
    transform: rotate(-15deg);
    border: 3px solid #DC143C;
    padding: 2px 8px;
    opacity: 0.7;
}

/* Close Button - Intentionally small and hard to find! */
.feedback-close-btn {
    position: absolute;
    top: 20px;
    left: 20px; /* Changed from right to left */
    background: #DC143C;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 3px 6px; /* Much smaller padding */
    font-size: 9px; /* Tiny font size */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    transform: scale(0.75); /* Scale down to 75% of already small size */
    opacity: 0.8; /* Slightly transparent to make it less obvious */
}

.feedback-close-btn:hover {
    background: #B22222;
    transform: scale(0.85); /* Only slightly bigger on hover */
    opacity: 1; /* Full opacity on hover */
}

/* Header Section */
.feedback-header {
    padding: 40px 30px 20px;
    text-align: center;
}

.hurt-feelings-title {
    font-size: 32px;
    font-weight: bold;
    color: #DC143C;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.feedback-subtitle {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin: 5px 0;
}

.feedback-warning {
    background: #FFF3CD;
    border: 2px dashed #FFC107;
    padding: 10px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 13px;
    color: #856404;
}

/* Form Section */
.feedback-form-section {
    padding: 0 30px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.label-icon {
    font-size: 18px;
    margin-right: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #DDD;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #FFB6C1;
    outline: none;
    box-shadow: 0 0 10px rgba(255, 182, 193, 0.3);
}

/* Feedback Type Grid */
.feedback-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Changed to 3 columns for wider modal */
    gap: 15px; /* Increased gap for better spacing */
}

.type-option {
    cursor: pointer;
}

.type-option input[type="radio"] {
    display: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #DDD;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.type-option input[type="radio"]:checked + .type-card {
    background: #FFE4E1;
    border-color: #DC143C;
    transform: scale(1.05);
}

.type-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.type-text {
    font-size: 12px;
    font-weight: 600;
}

/* Tissue Counter */
.tissue-counter {
    background: #FFF;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #FFB6C1;
}

.tissue-counter input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.tissue-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

#tissueDisplay {
    font-weight: bold;
    color: #DC143C;
}

/* Acknowledgments */
.acknowledgments {
    background: #FFF0F5;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #FFB6C1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
}

/* Submit Button */
.submit-btn.file-it {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #8B7355 0%, #654321 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.submit-btn.file-it:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-icon-left, .btn-icon-right {
    font-size: 20px;
}

/* Folder Animation */
.folder-animation {
    display: none;
    position: relative;
    width: 200px;
    height: 250px;
    margin: 50px auto;
}

.folder-paper {
    width: 180px;
    height: 220px;
    background: #F4E4C1;
    border: 2px solid #8B7355;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.folder-tab {
    position: absolute;
    top: -30px;
    left: 10px;
    background: #F4E4C1;
    border: 2px solid #8B7355;
    border-bottom: none;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 12px;
}

.folder-body {
    padding: 40px 20px;
    text-align: center;
    font-size: 14px;
    color: #333;
}

.folder-appear {
    animation: folderAppear 0.5s ease-out;
}

@keyframes folderAppear {
    from {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.folder-to-pile {
    animation: folderFlyToPile 0.5s ease-out forwards;
}

@keyframes folderFlyToPile {
    to {
        transform: translateX(200px) translateY(-200px) scale(0.3) rotate(720deg);
        opacity: 0;
    }
}

.new-folder {
    background: #FFE4B5 !important;
    font-weight: bold;
}

@keyframes slideIntoPile {
    from {
        transform: translateY(-50px) rotate(0);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotate(-2deg);
        opacity: 1;
    }
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 20px;
}

.success-content {
    display: none;
}

.success-content.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.success-message h3 {
    color: #28A745;
    font-size: 24px;
    margin-bottom: 10px;
}

.success-note {
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

.success-sarcasm {
    font-size: 18px;
    color: #DC143C;
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    background: #FFE4E1;
    border-radius: 10px;
    border: 2px dashed #DC143C;
}

.btn-done {
    background: #28A745;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-done:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Footer */
.feedback-footer {
    background: #F8F9FA;
    padding: 20px;
    text-align: center;
    border-top: 2px solid #DDD;
}

.feedback-footer p {
    margin: 5px 0;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.tiny-text {
    font-size: 10px;
    color: #999;
    margin-top: 10px;
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .feedback-modal-content.hr-desk {
        max-width: 95%; /* More screen usage on tablets */
        width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
    }

    .feedback-type-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

/* Responsive - Mobile */
@media (max-width: 600px) {
    .feedback-modal-overlay.funzone-edition {
        padding: 10px; /* Less padding on mobile */
        align-items: flex-start; /* Start from top on mobile */
    }

    .feedback-modal-content.hr-desk {
        max-width: 100%;
        width: 100%;
        max-height: calc(100vh - 20px); /* Account for padding */
        margin: 10px 0;
        border-radius: 15px; /* Slightly less rounded on mobile */
        overflow-y: auto; /* Ensure scrolling on mobile */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .feedback-type-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 10px;
    }

    .hr-desk-scene {
        width: 150px;
        height: 120px;
    }

    .hurt-feelings-title {
        font-size: 24px;
    }

    /* Adjust form padding for mobile */
    .feedback-header {
        padding: 30px 20px 15px;
    }

    .feedback-form-section {
        padding: 0 20px 20px;
    }

    /* Close button - small but still touchable on mobile */
    .feedback-close-btn {
        padding: 5px 10px; /* Slightly bigger than desktop for touch */
        font-size: 11px; /* Still small but readable */
        top: 15px;
        left: 15px; /* Keep on left side for mobile too */
        transform: scale(0.9); /* Less scaling on mobile for usability */
        opacity: 0.85; /* Still somewhat hidden */
    }

    /* Ensure form inputs are touch-friendly */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
}