/* ============================================================
   MUVEUP.MUSIC – Einheitliche Modal/Popup Styles
   Basierend auf dem view-tender.html Design
   ============================================================ */

/* --- OVERLAY --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

/* Fehler-Popup „Datei zu groß“ immer über anderen Modals (z. B. „Medium hinzufügen“) */
#fileTooLargePopup.modal.active {
    z-index: 2100;
}

/* Compat: .confirm-modal wird ebenfalls unterstützt */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.confirm-modal.active {
    display: flex;
}

/* --- CONTENT BOX --- */
.modal-content {
    background: #fefefe;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalFadeIn 0.3s ease-out;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* Admin-Modals: Links-ausgerichtet */
.modal-content.admin-modal {
    text-align: left;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-content.admin-modal .modal-header,
.modal-content.admin-modal .modal-footer {
    flex-shrink: 0;
}

.modal-content.admin-modal .modal-body {
    overflow-y: auto;
    padding-right: 5px;
}

.modal-content.admin-modal .modal-footer {
    margin-top: auto;
    padding-top: 20px;
}

/* --- EINGANGS-ANIMATION --- */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- FARBKODIERTE OBERKANTEN --- */
.modal-border-blue {
    border-top: 5px solid #3b82f6;
}

.modal-border-green {
    border-top: 5px solid #22c55e;
}

.modal-border-orange {
    border-top: 5px solid #f59e0b;
}

.modal-border-red {
    border-top: 5px solid #ef4444;
}

.modal-border-purple {
    border-top: 5px solid #815da7;
}

/* Änderungen-verwerfen Bestätigungs-Popup */
.modal-content.discard-confirm-popup .modal-buttons {
    margin-top: 8px;
    gap: 12px;
}

/* --- CLOSE BUTTON (×) --- */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 1;
}

.close-modal:hover {
    color: #333;
}

/* --- ICON CONTAINER (Kreis mit SVG) --- */
.modal-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    flex-shrink: 0;
}

.modal-icon-container svg {
    width: 40px;
    height: 40px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Icon-Farb-Varianten */
.icon-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.icon-success svg {
    stroke: #16a34a;
}

.icon-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.icon-danger svg {
    stroke: #dc2626;
}

.icon-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.icon-warning svg {
    stroke: #d97706;
}

.icon-primary {
    background-color: #dbeafe;
    color: #2563eb;
}

.icon-primary svg {
    stroke: #2563eb;
}

.icon-info {
    background-color: #f3e8ff;
    color: #815da7;
}

.icon-info svg {
    stroke: #815da7;
}

.icon-orange {
    background-color: #fdf3e8;
    color: #e38722;
}

.icon-orange svg {
    stroke: #e38722;
}

/* Dashboard Artists: Willkommens-Pop-up (orange, freundlich) */
.modal-content.no-assignments-modal {
    max-width: 440px;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 12px 32px rgba(227, 135, 34, 0.15);
}

.modal-content.no-assignments-modal h3 {
    color: #c96b14;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
}

.modal-content.no-assignments-modal p {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}

.modal-content.no-assignments-modal .modal-icon-container.icon-orange {
    background: linear-gradient(135deg, #fdf3e8 0%, #fce8d6 100%);
    box-shadow: 0 4px 14px rgba(227, 135, 34, 0.2);
}

/* Emoji-Fallback im Icon-Container */
.modal-icon-container .modal-emoji {
    font-size: 36px;
    line-height: 1;
}

/* --- TYPOGRAFIE IM MODAL --- */
.modal-content h2 {
    color: #815da7;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
}

.modal-content h3 {
    color: #333;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
}

.modal-content p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-content p:last-of-type {
    margin-bottom: 25px;
}

/* --- BUTTON STYLES --- */
.popup-button {
    padding: 14px 24px;
    border: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Montserrat', Arial, sans-serif;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.popup-button:hover {
    transform: scale(1.05);
}

/* Primär (Blau) */
.btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

/* Erfolg (Grün) */
.btn-success {
    background: #22c55e;
    color: white;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: #16a34a;
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.4);
}

/* Sekundär (Grau) */
.btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

/* Gefahr (Rot) */
.btn-danger {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}

/* Brand (Lila) */
.btn-brand {
    background: #815da7;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(129, 93, 167, 0.3);
}

.btn-brand:hover {
    background: #6B46C1;
    box-shadow: 0 6px 20px rgba(129, 93, 167, 0.5);
}

/* Orange (Akzent) */
.btn-orange {
    background: #e38722;
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(227, 135, 34, 0.3);
}

.btn-orange:hover {
    background: #d37c1d;
    box-shadow: 0 6px 20px rgba(227, 135, 34, 0.5);
}

/* --- BUTTON CONTAINER --- */
.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.modal-buttons.stacked {
    flex-direction: column;
    gap: 12px;
}

.modal-buttons .popup-button {
    flex: 1;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
}

.modal-actions .popup-button {
    flex: 1;
}

/* --- REGISTRIERUNG HINT MODAL --- */
.modal-content.registration-hint {
    padding: 40px 30px;
    max-width: 480px;
    border-radius: 20px;
}

.modal-content.registration-hint h2 {
    color: #e38722;
    font-size: 24px;
    margin-bottom: 15px;
}

.modal-content.registration-hint p {
    font-size: 16px;
    margin-bottom: 30px;
}

.register-btn {
    background-color: #e38722;
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.2s, background 0.2s;
    border: none;
    display: block;
    text-align: center;
}

.register-btn:hover {
    background-color: #d37c1d;
    transform: translateY(-2px);
}

.cancel-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
    padding: 10px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.cancel-btn:hover {
    color: #666;
}

/* --- ANIMIERTE SYMBOLE (beibehalten) --- */

/* Handshake Icon */
.handshake-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: #815da7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: iconFadeIn 1s ease-out forwards;
}

.handshake-icon::before {
    content: '🤝';
    font-size: 40px;
    color: #FFFFFF;
}

/* Checkmark (animiert) – Klicks durchlassen */
.checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: iconFadeIn 1s ease-out forwards;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.checkmark::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Sonnenstrahlen – Klicks durchlassen, damit Buttons klickbar bleiben */
.sunrays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 69, 0) 70%);
    transform: translate(-50%, -50%);
    animation: sunraysPulse 2.5s infinite ease-in-out;
    z-index: 1;
    pointer-events: none;
}

/* Inquiry/Success Spezialvariante */
.modal-content.inquiry-confirm,
.modal-content.inquiry-success {
    background: #F9F7FD;
    padding: 30px 40px;
    border-radius: 20px;
    max-width: 450px;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Elegant Popup (z.B. E-Mail existiert) */
.modal-content.elegant-popup {
    background: #F9F7FD;
    border-radius: 20px;
    padding: 40px;
    max-width: 420px;
    border: 1px solid #E0D8F0;
}

.elegant-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #b39ed6, #815da7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elegant-popup-icon svg {
    width: 48px;
    height: 48px;
}

.elegant-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Email-Sent Spezialvariante */
.modal-content.email-sent {
    background: #F9F7FD;
    padding: 40px;
    border-radius: 20px;
    max-width: 450px;
    position: relative;
    overflow: hidden;
}

/* --- FORMULAR-ELEMENTE IM MODAL --- */
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    outline: none;
    border-color: #815da7;
}

.modal-content textarea {
    min-height: 80px;
    resize: vertical;
}

.modal-content label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    text-align: left;
}

.modal-content .form-group {
    margin-bottom: 15px;
    text-align: left;
}

/* --- SHARE MODAL SPEZIAL --- */
.copy-link-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.share-link-input {
    flex-grow: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    color: #555;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
}

.copy-btn {
    background: #e38722;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Montserrat', Arial, sans-serif;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #d37c1d;
}

/* --- REPORT MODAL SPEZIAL --- */
.modal-content .report-reasons {
    text-align: left;
    margin-bottom: 15px;
}

.modal-content .report-reasons label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-weight: 400;
    cursor: pointer;
}

.modal-content .report-reasons input[type="radio"] {
    width: auto;
    margin-bottom: 0;
}

.modal-content .modal-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* --- COOKIE MODAL SPEZIAL --- */
.modal-content.cookie-modal {
    max-width: 450px;
    padding: 35px;
}

.modal-content.cookie-modal h3 {
    color: #815da7;
    font-size: 24px;
    margin-bottom: 15px;
}

.cookie-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.cookie-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 400;
}

.cookie-options input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

/* Cookie-Modal: kompaktere Buttons (nicht zu groß) */
.modal-content.cookie-modal .modal-buttons {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.modal-content.cookie-modal .modal-buttons .popup-button {
    flex: 0 1 auto;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 10px;
}

/* --- ANIMATIONEN (beibehalten) --- */

@keyframes iconFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes sunraysPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.7;
    }
}

@keyframes bounceIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .modal-content {
        padding: 25px 20px;
        margin: 10px;
        border-radius: 14px;
    }

    .modal-content.admin-modal {
        max-height: 85vh;
    }

    .modal-icon-container {
        width: 65px;
        height: 65px;
    }

    .modal-icon-container svg {
        width: 32px;
        height: 32px;
    }

    .modal-content h2 {
        font-size: 20px;
    }

    .modal-content h3 {
        font-size: 20px;
    }

    .modal-content p {
        font-size: 14px;
    }

    .popup-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .modal-content.cookie-modal .modal-buttons .popup-button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .modal-buttons,
    .modal-actions {
        flex-direction: column;
    }

    .modal-content.registration-hint {
        padding: 30px 20px;
    }
}
