@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* All styles strictly scoped under .wp-tf-feedback-container to guarantee 100% theme isolation */

.wp-tf-feedback-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    width: 100% !important;
    max-width: 820px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    color: #1e293b;
    line-height: 1.5;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
}

.wp-tf-feedback-container * {
    box-sizing: border-box;
}

/* Header Section */
.wp-tf-feedback-container .wp-tf-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #2563eb 100%);
    color: #ffffff;
    padding: 38px 24px;
    text-align: center;
    position: relative;
}

.wp-tf-feedback-container .wp-tf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 14px;
    letter-spacing: 0.02em;
}

.wp-tf-feedback-container .wp-tf-title {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.wp-tf-feedback-container .wp-tf-subtitle {
    font-size: 0.92rem;
    color: #94a3b8;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Form Layout */
.wp-tf-feedback-container .wp-tf-form {
    padding: 28px 20px;
    width: 100%;
}

.wp-tf-feedback-container .wp-tf-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 24px 18px;
    margin-bottom: 24px;
    width: 100%;
}

.wp-tf-feedback-container .wp-tf-section-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 14px;
}

.wp-tf-feedback-container .wp-tf-section-num {
    background: #2563eb;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.wp-tf-feedback-container .wp-tf-section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 3px 0;
    color: #0f172a;
}

.wp-tf-feedback-container .wp-tf-section-header p {
    font-size: 0.86rem;
    color: #64748b;
    margin: 0;
}

/* Dynamic Trainer Card - Centered Profile Layout */
.wp-tf-feedback-container .wp-tf-trainers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.wp-tf-feedback-container .wp-tf-trainer-eval-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    padding: 24px 20px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-tf-feedback-container .wp-tf-trainer-eval-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.07);
}

/* Centered Trainer Avatar & Name */
.wp-tf-feedback-container .trainer-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #cbd5e1;
    width: 100%;
}

.wp-tf-feedback-container .trainer-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wp-tf-feedback-container .trainer-photo img,
.wp-tf-feedback-container .trainer-avatar-default {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.wp-tf-feedback-container .trainer-avatar-default {
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.wp-tf-feedback-container .trainer-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.wp-tf-feedback-container .trainer-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: #0f172a;
    line-height: 1.3;
}

.wp-tf-feedback-container .trainer-title {
    font-size: 0.86rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
    max-width: 95%;
}

/* Star Rating Controls */
.wp-tf-feedback-container .trainer-ratings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    width: 100%;
}

.wp-tf-feedback-container .rating-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.wp-tf-feedback-container .rating-group.full-width {
    grid-column: 1 / -1;
}

.wp-tf-feedback-container .rating-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    gap: 8px;
}

.wp-tf-feedback-container .rating-val-display {
    color: #d97706;
    font-weight: 700;
    font-size: 0.82rem;
    background: #fffbeb;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #fef3c7;
    white-space: nowrap;
}

.wp-tf-feedback-container .star-rating-control {
    display: flex;
    gap: 6px;
    align-items: center;
}

.wp-tf-feedback-container .star-rating-control .star {
    font-size: 2.1rem;
    color: #cbd5e1;
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease;
    user-select: none;
    line-height: 1;
    touch-action: manipulation;
}

.wp-tf-feedback-container .star-rating-control .star:hover,
.wp-tf-feedback-container .star-rating-control .star.star-active {
    color: #f59e0b;
    transform: scale(1.12);
}

.wp-tf-feedback-container .rating-label-small {
    font-size: 0.83rem;
    font-weight: 600;
    color: #475569;
}

.wp-tf-feedback-container textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 0.88rem;
    color: #1e293b;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.wp-tf-feedback-container textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Metrics Grid (7 Program Metrics) */
.wp-tf-feedback-container .wp-tf-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    width: 100%;
}

.wp-tf-feedback-container .metric-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.wp-tf-feedback-container .metric-item.full-width {
    grid-column: 1 / -1;
}

.wp-tf-feedback-container .metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.wp-tf-feedback-container .metric-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

/* NPS Recommendation Scale */
.wp-tf-feedback-container .nps-box {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 18px;
}

.wp-tf-feedback-container .nps-question {
    font-size: 0.85rem;
    color: #475569;
    margin: 0 0 12px 0;
}

.wp-tf-feedback-container .nps-scale-control {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.wp-tf-feedback-container .nps-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 0;
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

.wp-tf-feedback-container .nps-btn:hover,
.wp-tf-feedback-container .nps-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.wp-tf-feedback-container .nps-val-display {
    font-weight: 700;
    color: #2563eb;
    font-size: 0.85rem;
}

.wp-tf-feedback-container .nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.76rem;
    color: #64748b;
    font-weight: 500;
}

/* Submit Button */
.wp-tf-feedback-container .wp-tf-submit-row {
    text-align: center;
    margin-top: 15px;
    width: 100%;
}

.wp-tf-feedback-container .wp-tf-submit-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 15px 36px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    text-transform: none;
}

.wp-tf-feedback-container .wp-tf-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4);
}

/* Success Modal Overlay */
.wp-tf-success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    box-sizing: border-box;
}

.wp-tf-success-modal .success-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 24px;
    text-align: center;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.wp-tf-success-modal .success-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.wp-tf-success-modal .success-content h2 {
    font-size: 1.6rem;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.wp-tf-success-modal .success-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 22px;
    line-height: 1.5;
}

.wp-tf-success-modal .wp-tf-reset-btn {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (CENTERED AVATAR & FULL MOBILE WIDTH FIX)
   ========================================================================== */

@media (max-width: 768px) {
    .wp-tf-feedback-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        border-radius: 16px;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .wp-tf-feedback-container .wp-tf-header {
        padding: 26px 16px;
    }

    .wp-tf-feedback-container .wp-tf-title {
        font-size: 1.45rem;
    }

    .wp-tf-feedback-container .wp-tf-subtitle {
        font-size: 0.86rem;
    }

    .wp-tf-feedback-container .wp-tf-form {
        padding: 16px 10px;
    }

    .wp-tf-feedback-container .wp-tf-section {
        padding: 16px 12px;
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .wp-tf-feedback-container .wp-tf-metrics-grid {
        grid-template-columns: 1fr;
    }

    .wp-tf-feedback-container .trainer-ratings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .wp-tf-feedback-container .wp-tf-header {
        padding: 22px 14px;
    }

    .wp-tf-feedback-container .wp-tf-badge {
        font-size: 0.76rem;
        padding: 4px 10px;
    }

    .wp-tf-feedback-container .wp-tf-title {
        font-size: 1.3rem;
    }

    .wp-tf-feedback-container .wp-tf-section-header {
        gap: 10px;
    }

    .wp-tf-feedback-container .wp-tf-section-num {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .wp-tf-feedback-container .wp-tf-section-header h2 {
        font-size: 1.05rem;
    }

    /* Centered Trainer Profile on Mobile */
    .wp-tf-feedback-container .trainer-profile {
        gap: 8px;
    }

    .wp-tf-feedback-container .trainer-photo img,
    .wp-tf-feedback-container .trainer-avatar-default {
        width: 68px;
        height: 68px;
    }

    .wp-tf-feedback-container .trainer-name {
        font-size: 1.1rem;
    }

    .wp-tf-feedback-container .trainer-title {
        font-size: 0.82rem;
    }

    .wp-tf-feedback-container .rating-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .wp-tf-feedback-container .metric-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .wp-tf-feedback-container .star-rating-control .star {
        font-size: 2.1rem;
    }

    .wp-tf-feedback-container .nps-scale-control {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .wp-tf-feedback-container .nps-btn {
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .wp-tf-feedback-container .wp-tf-submit-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1rem;
    }
}
