/**
 * FlyAgain Pilot-Connect - Frontend Dashboard Styles
 * Farbschema: Himmel-inspiriert (flyagain.de)
 *
 * Primaerfarben:
 *   Sky Blue:     #4A9FE8
 *   Light Sky:    #87CEEB
 *   Cloud White:  #F0F8FF
 *
 * Akzentfarben:
 *   Sunrise Gold: #FFB347
 *   Deep Horizon: #2C5F8D
 *
 * Neutrale Farben:
 *   Cloud Gray:   #E8F4F8
 *   Text Dark:    #1A2B3C
 *   Text Light:   #5A6C7D
 */

/* ===== Dashboard Container ===== */
.fapc-dashboard {
    max-width: 960px;
    margin: 0 auto;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 30px;
    background: linear-gradient(135deg, #F0F8FF 0%, #E8F4F8 100%);
    border-radius: 16px;
}

.fapc-dashboard h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #2C5F8D;
    font-size: 1.8rem;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

/* ===== Tabs ===== */
.fapc-tabs {
    display: flex;
    border-bottom: 2px solid #E8F4F8;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 4px;
}

.fapc-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: #5A6C7D;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.fapc-tab-btn:hover {
    color: #4A9FE8;
    background: rgba(74, 159, 232, 0.05);
}

.fapc-tab-btn.active {
    border-bottom-color: #4A9FE8;
    color: #4A9FE8;
    font-weight: 600;
    background: rgba(74, 159, 232, 0.08);
}

.fapc-tab-content {
    display: none;
}

.fapc-tab-content.active {
    display: block;
}

/* ===== Mission Cards (Glass-Morphismus) ===== */
.fapc-mission-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.fapc-mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.fapc-mission-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1A2B3C;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
}

/* ===== Mission Details ===== */
.fapc-mission-details {
    margin: 15px 0;
    background: rgba(240, 248, 255, 0.8);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #E8F4F8;
}

.fapc-mission-details p {
    margin: 6px 0;
    color: #1A2B3C;
    font-size: 0.95rem;
}

.fapc-mission-details p strong {
    color: #2C5F8D;
}

/* ===== Buttons ===== */
.fapc-claim-btn,
.fapc-complete-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

/* CTA: Sunrise Gold fuer "Flug uebernehmen" */
.fapc-claim-btn {
    background: #FFB347;
    color: #1A2B3C;
    box-shadow: 0 4px 12px rgba(255, 179, 71, 0.3);
}

.fapc-claim-btn:hover {
    background: #FFA726;
    color: #1A2B3C;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 179, 71, 0.4);
}

/* Gruen fuer "Abgeschlossen" */
.fapc-complete-btn {
    background: #28a745;
    color: #fff;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.fapc-complete-btn:hover {
    background: #218838;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.fapc-claim-btn:disabled,
.fapc-complete-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ===== Notices ===== */
.fapc-notice {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-weight: 500;
}

.fapc-notice.success {
    background: rgba(212, 237, 218, 0.9);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fapc-notice.error {
    background: rgba(248, 215, 218, 0.9);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== Statistik-Boxen ===== */
.fapc-stats-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.fapc-stat-box {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, #4A9FE8 0%, #2C5F8D 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.3);
}

.fapc-stat-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 6px;
}

.fapc-stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* ===== Historie ===== */
.fapc-history-item {
    border-left: 4px solid #4A9FE8;
    padding-left: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E8F4F8;
}

.fapc-history-item:last-child {
    border-bottom: none;
}

.fapc-history-title {
    font-weight: 600;
    font-size: 1.1em;
    color: #1A2B3C;
    font-family: 'Outfit', sans-serif;
}

.fapc-history-meta {
    font-size: 0.9em;
    color: #5A6C7D;
    margin-top: 6px;
    line-height: 1.6;
}

/* ===== Leere Zustaende ===== */
.fapc-dashboard .fapc-tab-content > p {
    color: #5A6C7D;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .fapc-dashboard {
        padding: 16px;
        border-radius: 0;
    }

    .fapc-dashboard h2 {
        font-size: 1.4rem;
    }

    .fapc-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 4px;
    }

    .fapc-tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        border-radius: 8px;
        text-align: left;
        padding: 10px 16px;
    }

    .fapc-tab-btn.active {
        border-bottom: none;
        border-left-color: #4A9FE8;
    }

    .fapc-mission-card {
        padding: 16px;
    }

    .fapc-stat-box {
        min-width: 100%;
    }
}

/* ===== Modal Overlay ===== */
.fapc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 43, 60, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fapc-modal {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.fapc-modal h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #2C5F8D;
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 12px;
}

.fapc-modal p {
    color: #5A6C7D;
    margin-bottom: 16px;
}

.fapc-modal-date-option {
    display: block;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(240, 248, 255, 0.8);
    border-radius: 10px;
    border: 1px solid #E8F4F8;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1A2B3C;
    font-size: 0.95rem;
}

.fapc-modal-date-option:hover {
    background: rgba(74, 159, 232, 0.1);
    border-color: #4A9FE8;
}

.fapc-modal-date-option input[type="checkbox"],
.fapc-modal-date-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #4A9FE8;
}

.fapc-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.fapc-modal-cancel-btn {
    background: transparent;
    border: 2px solid #E8F4F8;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    color: #5A6C7D;
    transition: all 0.3s ease;
}

.fapc-modal-cancel-btn:hover {
    border-color: #ccc;
    color: #1A2B3C;
}

/* ===== Filter Bar ===== */
.fapc-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    flex-wrap: wrap;
    align-items: center;
}

.fapc-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fapc-filter-group label {
    font-weight: 600;
    color: #2C5F8D;
    font-size: 0.9rem;
    white-space: nowrap;
}

.fapc-filter-group select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #E8F4F8;
    background: #F0F8FF;
    color: #1A2B3C;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    min-width: 180px;
}

.fapc-filter-group select:focus {
    outline: none;
    border-color: #4A9FE8;
    box-shadow: 0 0 0 3px rgba(74, 159, 232, 0.15);
}

/* ===== Erweiterte Statistiken ===== */
.fapc-stat-box-secondary {
    background: linear-gradient(135deg, #FFB347 0%, #FF8C00 100%);
}

.fapc-stat-number-small {
    font-size: 1.1rem;
    word-break: break-word;
}

/* Monatlicher Trend (Balkendiagramm) */
.fapc-monthly-trend {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 180px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    margin-bottom: 30px;
}

.fapc-trend-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.fapc-trend-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, #4A9FE8 0%, #2C5F8D 100%);
    border-radius: 8px 8px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
}

.fapc-trend-count {
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: #2C5F8D;
    margin-bottom: 6px;
    font-size: 1rem;
}

.fapc-trend-label {
    font-size: 0.75rem;
    color: #5A6C7D;
    margin-top: 6px;
    text-align: center;
}

/* ===== Einstellungen-Tab ===== */
.fapc-settings-section {
    margin-bottom: 20px;
}

.fapc-radio-option,
.fapc-checkbox-option {
    display: block;
    padding: 10px 16px;
    margin-bottom: 6px;
    background: rgba(240, 248, 255, 0.8);
    border-radius: 10px;
    border: 1px solid #E8F4F8;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1A2B3C;
    font-size: 0.95rem;
}

.fapc-radio-option:hover,
.fapc-checkbox-option:hover {
    background: rgba(74, 159, 232, 0.1);
    border-color: #4A9FE8;
}

.fapc-radio-option input[type="radio"],
.fapc-checkbox-option input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #4A9FE8;
}

.fapc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
    margin-top: 12px;
}

#fapc-preferred-types h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #2C5F8D;
    margin-bottom: 12px;
}

#fapc-complete-manual-date label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1A2B3C;
    font-weight: 500;
}

#fapc-complete-manual-date input[type="date"] {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #E8F4F8;
    background: #F0F8FF;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
}

/* ===== Kundendaten-Anzeige ===== */
.fapc-customer-info {
    margin-top: 14px;
    padding: 12px 16px;
    border-left: 3px solid #FFB347;
    background: rgba(255, 179, 71, 0.06);
    border-radius: 0 10px 10px 0;
}

.fapc-customer-info h4 {
    margin: 0 0 8px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2C5F8D;
    letter-spacing: 0.02em;
}

.fapc-customer-info p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: #3A3A3A;
    line-height: 1.5;
}

.fapc-customer-info a {
    color: #4A9FE8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.fapc-customer-info a:hover {
    color: #2C5F8D;
    text-decoration: underline;
}

.fapc-customer-info-pending {
    margin-top: 14px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-style: italic;
    color: #8899AA;
    border-left: 3px solid #E8F4F8;
    background: rgba(232, 244, 248, 0.3);
    border-radius: 0 10px 10px 0;
}

/* ===== Responsive Ergaenzungen ===== */
@media (max-width: 768px) {
    .fapc-filter-bar {
        flex-direction: column;
    }

    .fapc-filter-group {
        width: 100%;
    }

    .fapc-filter-group select {
        min-width: 100%;
        flex: 1;
    }

    .fapc-modal {
        width: 95%;
        padding: 20px;
    }

    .fapc-modal-actions {
        flex-direction: column;
    }

    .fapc-monthly-trend {
        height: 140px;
        padding: 12px;
        gap: 6px;
    }

    .fapc-trend-label {
        font-size: 0.65rem;
    }

    .fapc-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .fapc-agb-container {
        padding: 20px !important;
        margin: 10px !important;
    }

    .fapc-agb-section {
        padding: 16px !important;
    }

    .fapc-agb-container h1 {
        font-size: 1.5rem !important;
    }
}

/* ===== AGB-Abschnitt im Claim-Modal ===== */
#fapc-claim-agb-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E8F4F8;
}

.fapc-agb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #1A2B3C;
    cursor: pointer;
    padding: 12px 14px;
    background: rgba(74, 159, 232, 0.04);
    border: 1px solid #E8F4F8;
    border-radius: 10px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.fapc-agb-checkbox-label:hover {
    border-color: #4A9FE8;
    background: rgba(74, 159, 232, 0.08);
}

.fapc-agb-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: #4A9FE8;
    width: 18px;
    height: 18px;
}

.fapc-agb-checkbox-label a {
    color: #4A9FE8;
    font-weight: 600;
    text-decoration: none;
}

.fapc-agb-checkbox-label a:hover {
    color: #2C5F8D;
    text-decoration: underline;
}

.fapc-no-dates-hint {
    color: #5A6C7D;
    font-style: italic;
    font-size: 0.9rem;
    margin: 8px 0;
}

/* ===== AGB-Seite (Shortcode) ===== */
.fapc-agb-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding: 40px;
    background: linear-gradient(135deg, #F0F8FF 0%, #E8F4F8 100%);
    border-radius: 16px;
}

.fapc-agb-header {
    text-align: center;
    margin-bottom: 32px;
}

.fapc-agb-container h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #2C5F8D;
    font-size: 2rem;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.fapc-agb-subtitle {
    color: #5A6C7D;
    font-size: 0.95rem;
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.fapc-agb-date {
    color: #8899AA;
    font-size: 0.85rem;
    font-style: italic;
    margin: 0;
}

.fapc-agb-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 24px;
    margin-bottom: 16px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.fapc-agb-section h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #2C5F8D;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #E8F4F8;
}

.fapc-agb-section p,
.fapc-agb-section li {
    color: #1A2B3C;
    font-size: 0.92rem;
    line-height: 1.7;
}

.fapc-agb-section ol {
    padding-left: 22px;
    margin: 0;
}

.fapc-agb-section ol li {
    margin-bottom: 10px;
}

.fapc-agb-section ul {
    padding-left: 20px;
    margin: 6px 0;
    list-style: disc;
}

.fapc-agb-section ul li {
    margin-bottom: 4px;
}

/* Vertragsstrafen-Section hervorgehoben */
.fapc-agb-section.fapc-agb-penalty {
    border-left: 4px solid #FFB347;
    background: rgba(255, 179, 71, 0.06);
}

.fapc-agb-section.fapc-agb-penalty h2 {
    color: #CC7A00;
}

.fapc-agb-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid rgba(74, 159, 232, 0.2);
}

.fapc-agb-footer p {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #2C5F8D;
    font-size: 1rem;
    margin: 0 0 6px 0;
}

.fapc-agb-footer-note {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 400 !important;
    color: #8899AA !important;
    font-size: 0.8rem !important;
    font-style: italic;
}
