/*
 * Service-Profil-Modal — gleiche Sprache wie navbar-modern / shop-dropdown-modern
 * Alle Regeln unter #service-profile-modal um Seiten-globalen .modal-Stil nicht zu brechen.
 */

#service-profile-modal.modal {
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.72) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

#service-profile-modal .modal-content.service-profile-content {
    background: rgba(20, 20, 24, 0.94) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 165, 0, 0.16) !important;
    border-radius: 16px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    max-width: 720px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    width: 100%;
    color: #fff;
}

#service-profile-modal .modal-content.service-profile-content .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem !important;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 16px 16px 0 0 !important;
}

#service-profile-modal .modal-content.service-profile-content .modal-header h3 {
    margin: 0 !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #ffb84d !important;
    letter-spacing: -0.02em;
}

#service-profile-modal .modal-content.service-profile-content .modal-header .close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    opacity: 1 !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#service-profile-modal .modal-content.service-profile-content .modal-header .close:hover {
    color: #ffb84d !important;
    border-color: rgba(255, 165, 0, 0.35);
    background: rgba(255, 165, 0, 0.1);
}

#service-profile-modal .service-profile-modal-body {
    padding: 1rem 1.1rem 1.15rem !important;
}

/* Profil / Chat — Segmented Control */
#service-profile-modal .service-profile-view-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 1rem 0 !important;
    padding: 5px !important;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

#service-profile-modal .service-profile-view-tab {
    flex: 1;
    padding: 0.55rem 0.75rem !important;
    border-radius: 9px !important;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.58) !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    gap: 0.45rem !important;
    transition: background 0.15s ease, color 0.15s ease;
}

#service-profile-modal .service-profile-view-tab:hover {
    color: rgba(255, 255, 255, 0.88) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

#service-profile-modal .service-profile-view-tab.active {
    color: #1a1a1e !important;
    background: linear-gradient(145deg, #ffb300 0%, #e8890a 100%) !important;
    box-shadow: 0 2px 10px rgba(255, 165, 0, 0.28);
}

#service-profile-modal .service-profile-view-tab.active i {
    color: #1a1a1e;
}

#service-profile-modal .service-profile-view-tab:focus {
    outline: none;
}

#service-profile-modal .service-profile-view-tab:focus-visible {
    outline: 2px solid rgba(255, 179, 0, 0.95);
    outline-offset: 2px;
    z-index: 1;
}

#service-profile-modal .service-profile-container-compact {
    padding: 0 !important;
}

#service-profile-modal .service-profile-header-compact {
    margin-bottom: 1rem;
    gap: 1rem;
    align-items: center;
}

#service-profile-modal .service-profile-image-frame-compact {
    border: 1px solid rgba(255, 165, 0, 0.22);
    border-radius: 14px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

#service-profile-modal .service-profile-avatar-compact {
    border-radius: 10px;
    background: rgba(14, 14, 18, 0.85);
}

#service-profile-modal .service-profile-info-compact h2 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    letter-spacing: -0.02em;
}

#service-profile-modal .service-profile-categories-compact :is(span, .service-profile-category-chip) {
    border-radius: 999px !important;
}

#service-profile-modal .service-profile-details-compact {
    margin-bottom: 1rem !important;
    padding: 0.75rem 0.9rem !important;
    background: rgba(20, 20, 24, 0.55) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 165, 0, 0.12) !important;
    border-radius: 12px !important;
}

#service-profile-modal .detail-row-compact {
    font-size: 0.82rem !important;
    margin-bottom: 0.35rem !important;
}

#service-profile-modal .detail-label-compact {
    color: rgba(255, 255, 255, 0.52) !important;
}

#service-profile-modal .detail-value-compact {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Big7 / Gratis-Coins-Karte */
#service-profile-modal .service-profile-preview-card {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding: 1rem 1.05rem !important;
    background: rgba(20, 20, 24, 0.6) !important;
    border: 1px solid rgba(255, 165, 0, 0.18) !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#service-profile-modal .service-profile-preview-card h2.service-profile-preview-title {
    text-align: center;
    color: #ffb84d !important;
    font-weight: 700 !important;
    margin: 0 0 0.85rem !important;
    font-size: 1rem !important;
}

#service-profile-modal .service-profile-preview-card input[type="text"],
#service-profile-modal .service-profile-preview-card input[type="email"] {
    font: 600 0.88rem/1.4 system-ui, -apple-system, sans-serif !important;
    width: 100% !important;
    border: 1px solid rgba(255, 165, 0, 0.25) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #fff !important;
    margin: 0 0 0.65rem !important;
    padding: 0.65rem 0.85rem !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;
}

#service-profile-modal .service-profile-preview-card input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#service-profile-modal .service-profile-preview-card #contact-submit {
    font: 700 0.9rem system-ui, sans-serif !important;
    width: 100% !important;
    border: 1px solid rgba(76, 175, 80, 0.45) !important;
    background: linear-gradient(145deg, #43a047 0%, #2e7d32 100%) !important;
    color: #fff !important;
    padding: 0.65rem !important;
    border-radius: 10px !important;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

#service-profile-modal .service-profile-preview-card #contact-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.25);
}

#service-profile-modal .service-profile-description-compact {
    margin-bottom: 1rem !important;
    padding: 0.85rem 0.95rem !important;
    background: rgba(20, 20, 24, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
}

#service-profile-modal .service-profile-description-compact h4 {
    color: #ffb84d !important;
    font-size: 0.82rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem !important;
}

#service-profile-modal .service-profile-description-compact p {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    color: rgba(255, 255, 255, 0.88) !important;
}

#service-profile-modal .profile-image-frame-compact {
    border: 1px solid rgba(255, 165, 0, 0.2) !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Galerie */
#service-profile-modal .service-profile-images-compact {
    gap: 0.55rem !important;
    margin-bottom: 1rem !important;
}

#service-profile-modal .service-profile-social-compact {
    margin-bottom: 1rem !important;
    padding: 0.85rem !important;
    background: rgba(20, 20, 24, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 12px !important;
}

#service-profile-modal .service-profile-social-compact h4 {
    color: #ffb84d !important;
    font-size: 0.82rem !important;
    margin: 0 0 0.5rem !important;
}

#service-profile-modal .service-profile-stats-compact {
    margin-bottom: 0.75rem;
}

#service-profile-modal .profile-stat-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    font-weight: 600;
}

#service-profile-modal .profile-stat-compact i {
    color: #ffb84d;
}

/* Chat-Stat-Karten */
#service-profile-modal .service-profile-chat-stats-3d {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

#service-profile-modal .chat-stat-card-3d {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem !important;
    border-radius: 12px !important;
    background: rgba(20, 20, 24, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    transform: none !important;
}

#service-profile-modal .chat-stat-card-3d:hover {
    transform: none !important;
    border-color: rgba(255, 165, 0, 0.22) !important;
}

#service-profile-modal .chat-stat-icon-3d {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    background: rgba(255, 165, 0, 0.12) !important;
    color: #ffb84d !important;
    font-size: 1rem !important;
    box-shadow: none !important;
}

#service-profile-modal .chat-stat-label-3d {
    font-size: 0.68rem !important;
    color: rgba(255, 255, 255, 0.52) !important;
}

#service-profile-modal .chat-stat-value-3d {
    font-size: 1.15rem !important;
    color: #fff !important;
}

/* Spenden */
#service-profile-modal .coin-donate-section {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding: 0.85rem;
    background: rgba(20, 20, 24, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

#service-profile-modal .donate-main-btn-3d {
    width: 100%;
    border-radius: 11px !important;
    border: 1px solid rgba(255, 165, 0, 0.35) !important;
    background: rgba(255, 165, 0, 0.12) !important;
    color: #ffb84d !important;
    font-weight: 700 !important;
    padding: 0.65rem !important;
    box-shadow: none !important;
}

#service-profile-modal .donate-main-btn-3d::before {
    display: none !important;
}

#service-profile-modal .donate-main-btn-3d:hover {
    background: rgba(255, 165, 0, 0.2) !important;
    transform: none !important;
}

#service-profile-modal .donate-percentage-buttons {
    gap: 0.4rem !important;
    margin-top: 0.65rem !important;
}

#service-profile-modal .donate-percentage-btn-3d {
    border-radius: 9px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 600 !important;
}

#service-profile-modal .donate-percentage-btn-3d:hover {
    border-color: rgba(255, 165, 0, 0.4) !important;
    color: #ffb84d !important;
}

#service-profile-modal .donate-custom-btn-3d {
    border-radius: 9px !important;
    border: 1px dashed rgba(255, 165, 0, 0.35) !important;
    background: transparent !important;
    color: #ffb84d !important;
}

#service-profile-modal .donate-custom-input-container {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 165, 0, 0.18) !important;
    background: rgba(0, 0, 0, 0.22) !important;
}

#service-profile-modal .donate-custom-input-container input {
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #fff !important;
}

/* Aktionsleiste */
#service-profile-modal .service-profile-actions-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

#service-profile-modal .btn-action-modal {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.6rem 0.65rem !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    box-shadow: none !important;
}

#service-profile-modal .btn-action-modal:hover {
    border-color: rgba(255, 165, 0, 0.35) !important;
    background: rgba(255, 165, 0, 0.1) !important;
    color: #ffb84d !important;
    transform: none !important;
}

#service-profile-modal .btn-action-modal i {
    color: #ffb84d !important;
}

/* Chat-Panel (nicht Vollbild) */
#service-profile-modal #service-profile-conversation {
    border: 1px solid rgba(255, 165, 0, 0.14) !important;
    background: rgba(20, 20, 24, 0.55) !important;
    border-radius: 14px !important;
}

#service-profile-modal #service-profile-conversation-header-bar h4 {
    color: #ffb84d !important;
    font-size: 1rem !important;
}

#service-profile-modal #service-profile-chat-access-container {
    border-radius: 12px !important;
    border: 1px solid rgba(255, 165, 0, 0.16) !important;
    background: rgba(255, 165, 0, 0.06) !important;
}

/* Chat-Tab: Höhe unter den Tabs nutzen, bessere Übersicht (Desktop) */
#service-profile-modal .service-profile-modal-body--chat-full #service-profile-panel-chat.service-profile-chat-expanded {
    flex: 1 1 auto;
    min-height: min(52vh, 480px);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

#service-profile-modal .service-profile-modal-body--chat-full #service-profile-panel-chat.service-profile-chat-expanded #service-profile-conversation {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    display: flex !important;
    flex-direction: column;
}

@media (max-width: 768px) {
    #service-profile-modal .service-profile-modal-body--chat-full #service-profile-panel-chat.service-profile-chat-expanded {
        min-height: 0;
    }

    #service-profile-modal .modal-content.service-profile-content .modal-header {
        border-radius: 0 !important;
    }

    #service-profile-modal .service-profile-chat-stats-3d {
        grid-template-columns: 1fr;
    }

    #service-profile-modal .btn-action-modal {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #service-profile-modal .service-profile-preview-card #contact-submit:hover,
    #service-profile-modal .profile-image-frame-compact img:hover {
        transform: none;
    }
}
