/* ==========================================
   TYPECLIMB FEEDBACK
========================================== */

.feedback-page {
    min-height: 70vh;

    padding: 70px 20px 90px;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(124, 92, 255, 0.08),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(72, 118, 255, 0.07),
            transparent 30%
        ),
        var(--tc-bg);

    color: var(--tc-text);
}


.feedback-container {
    width: min(100%, 900px);

    margin: 0 auto;
}


/* ==========================================
   HERO
========================================== */

.feedback-hero {
    max-width: 700px;

    margin:
        0 auto 40px;

    text-align: center;
}


.feedback-hero-icon {
    width: 64px;
    height: 64px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin:
        0 auto 18px;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #8b6fff,
            #6542f5
        );

    color: #fff;

    font-size: 1.65rem;

    box-shadow:
        0 12px 35px
        rgba(100, 70, 255, 0.25);
}


.feedback-badge {
    display: inline-block;

    margin-bottom: 12px;

    color: #6542f5;

    font-size: 0.82rem;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


.feedback-hero h1 {
    margin: 0 0 16px;

    color: var(--tc-text);

    font-size: clamp(
        2rem,
        5vw,
        3.1rem
    );

    line-height: 1.15;
}


.feedback-hero p {
    margin: 0;

    color: var(--tc-text-secondary);

    font-size: 1.05rem;

    line-height: 1.8;
}


/* ==========================================
   ALERTS
========================================== */

.feedback-alert {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;

    padding: 15px 18px;

    border-radius: 12px;

    line-height: 1.5;
}


.feedback-alert.success {
    border:
        1px solid
        rgba(22, 163, 74, 0.25);

    background:
        rgba(22, 163, 74, 0.08);

    color: #15803d;
}


.feedback-alert.error {
    border:
        1px solid
        rgba(220, 38, 38, 0.25);

    background:
        rgba(220, 38, 38, 0.08);

    color: #b91c1c;
}


/* ==========================================
   FORM CARD
========================================== */

.feedback-card {
    padding: 32px;

    border:
        1px solid
        var(--tc-border);

    border-radius: 20px;

    background:
        var(--tc-surface);

    box-shadow:
        var(--tc-shadow-lg);
}


.feedback-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


.feedback-field {
    margin-bottom: 22px;
}


.feedback-field label,
.feedback-label {
    display: block;

    margin-bottom: 9px;

    color: var(--tc-text);

    font-size: 0.94rem;

    font-weight: 700;
}


.feedback-field input,
.feedback-field select,
.feedback-field textarea {
    width: 100%;

    border:
        1px solid
        var(--tc-border);

    border-radius: 11px;

    outline: none;

    background: var(--tc-surface-alt);

    color: var(--tc-text);

    font: inherit;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}


.feedback-field input::placeholder,
.feedback-field textarea::placeholder {
    color: var(--tc-text-muted);
}


.feedback-field input,
.feedback-field select {
    height: 52px;

    padding: 0 16px;
}


.feedback-field textarea {
    min-height: 150px;

    padding: 15px 16px;

    resize: vertical;

    line-height: 1.7;
}


.feedback-field input:focus,
.feedback-field select:focus,
.feedback-field textarea:focus {
    border-color: #8b6fff;

    box-shadow:
        0 0 0 3px
        rgba(124, 92, 255, 0.12);
}


.feedback-field select {
    cursor: pointer;
}


.feedback-field-error {
    display: block;

    min-height: 18px;

    margin-top: 6px;

    color: var(--tc-danger);

    font-size: 0.82rem;
}


/* ==========================================
   RATING
========================================== */

.feedback-rating-field {
    margin-bottom: 22px;
}


.feedback-stars {
    display: inline-flex;

    flex-direction: row-reverse;

    justify-content: flex-end;

    gap: 7px;
}


.feedback-stars input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.feedback-stars label {
    color: var(--tc-border-strong);

    cursor: pointer;

    font-size: 1.8rem;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}


.feedback-stars label:hover,
.feedback-stars label:hover ~ label,
.feedback-stars input:checked ~ label {
    color: #ffc857;
}


.feedback-stars label:hover {
    transform: scale(1.08);
}


/* ==========================================
   MESSAGE COUNTER
========================================== */

.feedback-message-footer {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 15px;
}


.feedback-message-footer > span {
    flex-shrink: 0;

    color: var(--tc-text-muted);

    font-size: 0.8rem;
}


/* ==========================================
   SUBMIT
========================================== */

.feedback-submit {
    width: 100%;

    min-height: 54px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #8b6fff,
            #6d48ff
        );

    color: #fff;

    cursor: pointer;

    font: inherit;

    font-weight: 700;

    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}


.feedback-submit:hover {
    filter: brightness(1.1);

    transform: translateY(-1px);
}


/* ==========================================
   NOTE
========================================== */

.feedback-note {
    display: flex;

    align-items: center;

    gap: 18px;

    margin-top: 25px;

    padding: 24px;

    border:
        1px solid
        rgba(124, 92, 255, 0.2);

    border-radius: 18px;

    background:
        rgba(124, 92, 255, 0.06);
}


.feedback-note > i {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background:
        rgba(124, 92, 255, 0.14);

    color: #6542f5;
}


.feedback-note h2 {
    margin: 0 0 5px;

    color: var(--tc-text);

    font-size: 1.1rem;
}


.feedback-note p {
    margin: 0;

    color: var(--tc-text-secondary);

    line-height: 1.7;
}


/* ============================================================
   Review / Testimonial
============================================================ */

.feedback-rating-field[hidden],
.feedback-public-field[hidden] {
    display: none;
}


/* ============================================================
   Public Review Permission
============================================================ */

.feedback-public-field {
    margin: -4px 0 24px;
}


.feedback-checkbox {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    cursor: pointer;

    color: var(--tc-text-secondary);

    line-height: 1.6;
}


.feedback-checkbox input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.feedback-checkbox-box {
    width: 20px;
    height: 20px;

    flex: 0 0 20px;

    margin-top: 2px;

    border:
        1px solid
        var(--tc-border-strong);

    border-radius: 5px;

    background:
        var(--tc-surface-alt);

    position: relative;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.feedback-checkbox input:checked + .feedback-checkbox-box {
    border-color: #8b6fff;

    background: #6d48ff;
}


.feedback-checkbox input:checked + .feedback-checkbox-box::after {
    content: "\f00c";

    position: absolute;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #fff;

    font-family:
        "Font Awesome 6 Free";

    font-size: 0.72rem;

    font-weight: 900;
}


.feedback-checkbox input:focus-visible + .feedback-checkbox-box {
    box-shadow:
        0 0 0 3px
        rgba(124, 92, 255, 0.2);
}


.feedback-checkbox-text {
    font-size: 0.9rem;
}


.feedback-moderation-note {
    display: flex;

    align-items: flex-start;

    gap: 8px;

    margin: 10px 0 0 32px;

    color: var(--tc-text-muted);

    font-size: 0.8rem;

    line-height: 1.6;
}


.feedback-moderation-note i {
    flex-shrink: 0;

    margin-top: 3px;

    color: #8b6fff;
}


/* ============================================================
   Reviews Link
============================================================ */

.feedback-reviews-link {
    display: flex;

    align-items: center;

    gap: 18px;

    margin-top: 25px;

    padding: 22px 24px;

    border:
        1px solid
        rgba(255, 200, 87, 0.16);

    border-radius: 18px;

    background:
        rgba(255, 200, 87, 0.045);
}


.feedback-reviews-icon {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background:
        rgba(255, 200, 87, 0.12);

    color: #d99d00;
}


.feedback-reviews-content {
    flex: 1;

    min-width: 0;
}


.feedback-reviews-content h2 {
    margin: 0 0 5px;

    color: var(--tc-text);

    font-size: 1.1rem;
}


.feedback-reviews-content p {
    margin: 0;

    color: var(--tc-text-secondary);

    line-height: 1.6;
}


.feedback-reviews-button {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    flex-shrink: 0;

    padding: 11px 17px;

    border:
        1px solid
        rgba(139, 111, 255, 0.3);

    border-radius: 10px;

    background:
        rgba(124, 92, 255, 0.1);

    color: #6542f5;

    text-decoration: none;

    font-size: 0.88rem;

    font-weight: 700;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.feedback-reviews-button:hover {
    border-color: #8b6fff;

    background:
        rgba(124, 92, 255, 0.18);

    color: #5430df;

    transform: translateY(-1px);
}


.feedback-reviews-button i {
    transition:
        transform 0.2s ease;
}


.feedback-reviews-button:hover i {
    transform: translateX(3px);
}


/* ==========================================
   DARK THEME
========================================== */

html[data-theme="dark"] .feedback-page {
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(124, 92, 255, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 20%,
            rgba(72, 118, 255, 0.09),
            transparent 30%
        ),
        var(--tc-bg);
}


html[data-theme="dark"] .feedback-badge {
    color: #a995ff;
}


html[data-theme="dark"] .feedback-alert.success {
    border-color:
        rgba(46, 204, 113, 0.25);

    background:
        rgba(46, 204, 113, 0.08);

    color: #8ff0b4;
}


html[data-theme="dark"] .feedback-alert.error {
    border-color:
        rgba(255, 85, 85, 0.25);

    background:
        rgba(255, 85, 85, 0.08);

    color: #ffaaaa;
}


html[data-theme="dark"] .feedback-card {
    border-color: #374151;

    background:
        rgba(16, 31, 55, 0.82);

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.30);
}


html[data-theme="dark"] .feedback-field label,
html[data-theme="dark"] .feedback-label {
    color: #fff;
}


html[data-theme="dark"] .feedback-field input,
html[data-theme="dark"] .feedback-field select,
html[data-theme="dark"] .feedback-field textarea {
    border-color: #374151;

    background: #081221;

    color: #fff;
}


html[data-theme="dark"] .feedback-field input::placeholder,
html[data-theme="dark"] .feedback-field textarea::placeholder {
    color: #718096;
}


html[data-theme="dark"] .feedback-field-error {
    color: #ff8585;
}


html[data-theme="dark"] .feedback-stars label {
    color: #526077;
}


html[data-theme="dark"] .feedback-message-footer > span {
    color: #718096;
}


html[data-theme="dark"] .feedback-note > i {
    color: #a995ff;
}


html[data-theme="dark"] .feedback-checkbox {
    color: #dce4f2;
}


html[data-theme="dark"] .feedback-checkbox-box {
    border-color: #526077;

    background: #081221;
}


html[data-theme="dark"] .feedback-moderation-note {
    color: #718096;
}


html[data-theme="dark"] .feedback-reviews-icon {
    color: #ffc857;
}


html[data-theme="dark"] .feedback-reviews-content p {
    color: #dce4f2;
}


html[data-theme="dark"] .feedback-reviews-button {
    color: #b9aaff;
}


html[data-theme="dark"] .feedback-reviews-button:hover {
    color: #fff;
}


/* ==========================================
   SCREEN READER
========================================== */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 768px) {

    .feedback-page {
        padding:
            50px 15px 70px;
    }


    .feedback-grid {
        grid-template-columns: 1fr;
    }


    .feedback-card {
        padding: 25px;
    }


    .feedback-reviews-link {
        align-items: flex-start;

        flex-wrap: wrap;
    }


    .feedback-reviews-content {
        flex: 1 1 calc(100% - 66px);
    }


    .feedback-reviews-button {
        margin-left: 66px;
    }

}


@media (max-width: 576px) {

    .feedback-page {
        padding:
            40px 12px 60px;
    }


    .feedback-card {
        padding: 20px;
    }


    .feedback-note {
        align-items: flex-start;

        padding: 20px;
    }


    .feedback-moderation-note {
        margin-left: 0;

        margin-top: 12px;
    }


    .feedback-reviews-link {
        padding: 20px;
    }


    .feedback-reviews-content {
        flex-basis: calc(100% - 66px);
    }


    .feedback-reviews-button {
        width: 100%;

        justify-content: center;

        margin-left: 0;
    }

}