body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: auto;
    padding: 15px 0;
    font-family: 'Noto Sans Arabic', sans-serif;
    min-height: 100vh;
    box-sizing: border-box;

    background-color: #ffffff;
}
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding-right: 25%;
    box-sizing: border-box;
}

.form-card {
    background: #ffffff;
    width: 100%;
    max-width: 446px;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-direction: row-reverse;
}

.card-header #banner {
    margin: 0;
    max-width: none;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.card-header .back-link {
    margin: 0;
}

.logo {
    width: 182px;
    height: auto;
}

.back-link {
    font-size: 14px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: 4px;
    display: inline-block;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link:focus {
    outline: 2px solid #3867E5;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(56,103,229,0.15);
}

.card-separator {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 12px 0 16px;
}

.card-title {
    font-size: 28px;
    font-weight: 800;
    margin: 6px 0 8px;
}
#banner {
    text-align: center;
    margin-left: 35px;
    margin-right: 35px;
    max-width: 330px;
    min-width: 250px;
    width: 100%;
}

.intro-blurb, .alert, .contact-info-blurb {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-weight: normal; 
    max-width: 330px;
    box-sizing: border-box; 
}

.intro-blurb {
    max-width: none;
    width: 100%;
    font-size: 15px;
    line-height: 1.6;
    margin: 6px 0 10px;
}


.contact-info-blurb {
    max-width: none;
    width: 100%;
}


#messageBox {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

#messageBox textarea {
    width: 100%;
    max-width: none;
}

select, textarea, input, button {
    font-family: 'Noto Sans Arabic', sans-serif;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

select, input {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 16px;
    height: 44px;
    line-height: 24px;
    padding: 10px 12px;
    margin-bottom: 16px;
    width: 100%;
    border-radius: 5px;
    padding: 5px;
    background-color: white;
    color: black;
    border: 1px solid #ccc;
    appearance: menulist;
}

textarea {
    font-size: 16px;
    line-height: 1.5;
    padding: 10px 12px;
    margin-bottom: 16px;
    width: 100%;
    min-height: 140px;
    border-radius: 5px;
    border: 1px solid #ccc;
    resize: vertical;
    box-sizing: border-box;
}


select:focus, input:focus, textarea:focus, button:focus {
    outline: 2px solid #3867E5;
    outline-offset: 0;
    border-color: #3867E5;
    box-shadow: 0 0 0 2px rgba(56,103,229,0.15);
}

select::-webkit-select {
    border: none;
    background: transparent;
    padding-right: 10px;
}

#uploadForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

input[type="file"] {
    cursor: pointer;
    appearance: none;
    opacity: 0;
    width: 0.1px;
    height: 0.1px;
    position: absolute;
}

.file-label {
    display: inline-block;
    background-color: #003944;
    color: white;
    padding: 6px 18px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    margin: 10px;
    align-self: flex-end;
}

.file-label:hover {
    background-color: #01495a;
}

.file-label:active {
    background-color: #002a33;
}

#fileNameDisplay {
    font-family: 'Noto Sans Arabic', sans-serif;
    margin-top: 0px;
    color: #555;
    font-size: 14px;
}


#fileUploadSection {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    margin-top: 12px;
}

#fileUploadSection #fileNameDisplay {
    align-self: flex-end;
    text-align: right;
    order: 2;
    margin-left: 10px;
    margin-right: 10px;
}

.file-list {
    order: 2;
    width: 100%;
    margin-top: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 6px 0;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.file-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    background: #e9e9e9;
}

.file-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70vw;
}

.remove-file-btn {
    background: #d32f2f;
    color: #fff;
    border: none;
    
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}
.remove-file-btn:hover { background: #b71c1c; }

.clear-file-btn {
    background: transparent;
    border: none;
    color: #003944;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    margin-left: 8px;
}
.clear-file-btn:hover {
    color: #01495a;
}

#fileUploadSection .file-label { order: 1; }
#fileUploadSection .progress-bar { order: 3; width: 100%; }


#recaptchaContainer {
    width: 100%;
    display: none;
    justify-content: center;
    margin-top: 12px;
}


.radio-group {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    width: 100%;
}


#messageTypeRadioGroup {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}


#contactTypeRadioGroup {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
    flex: 0 0 auto;
    min-width: fit-content;
    white-space: nowrap;
}

#messageTypeRadioGroup .radio-option {
    max-width: 140px;
    padding: 7px 11px;
}


#contactTypeRadioGroup .radio-option {
    max-width: 120px;
    padding: 6px 9px;
}

.radio-option:hover {
    border-color: #003944;
    background: #f8f9fa;
}

.radio-option:hover .radio-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: #003944;
    font-weight: 700;
}

.radio-option input[type="radio"]:checked {
    background: #e3f2fd;
    border-color: #003944;
}

.radio-option:has(input[type="radio"]:checked) {
    background: #e3f2fd;
    border-color: #003944;
    position: relative;
}

.radio-icon {
    font-size: 16px;
    margin-left: 3px;
    margin-right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
}

.radio-label {
    font-size: 13px;
    color: #333;
    cursor: pointer;
    flex: 1;
    margin-right: 6px;
    text-align: right;
}

#contactBox {
    width: 100%;
    margin-bottom: 16px;
}

#upload-processing {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 22px;
    color: #003944;
    font-weight: 700;
    pointer-events: all;
    transition: background 0.25s ease;
}


#upload-processing.full-cover {
    background: rgba(255, 255, 255, 1);
}


#upload-processing.progress-mode {
    background: rgba(255, 255, 255, 0.5);
}


.processing-dots::after {
    content: " ...";
    animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
    0% { content: " ."; }
    33% { content: " .."; }
    66% { content: " ..."; }
    100% { content: " ."; }
}


.upload-success-check {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(2px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    pointer-events: all;
}

.upload-success-check .circle {
    width: 90px;
    height: 90px;
    background: #19a974;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-success-check .circle span {
    font-size: 48px;
    color: #fff;
}

#contact {
    width: 100%;
    box-sizing: border-box;
}


#alerts {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.alert {
    padding: 10px 20px;
    margin: 8px;
    border-radius: 5px;
    max-width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: opacity 0.5s ease-out;
    opacity: 1;
    direction: rtl;
}
.alert.hide {
    opacity: 0;
}

.error {
    background-color: #ff6666;
    color: white;
}

.unsupported {
    background-color: #ffd966;
    color: black;
}

#progress-bar {
    width: 100%;
    background-color: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    display: none;
    margin-top: 10px;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
    direction: rtl;
    font-family: 'Noto Sans Arabic';
    position: relative;
}

#progress-bar-fill {
    height: 20px;
    background-color: #4caf50;
    transition: width 0.4s ease;
    border-radius: 10px;
    width: 0%;
}

#progress-bar-fill span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-weight: bold;
    position: absolute;
}




.success {
    background-color: #2e7d32;
    color: white;
}

button {
    background-color: #003944;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    transition: box-shadow 0.3s ease;
    border-radius: 5px;
}

button:hover {
    box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}


#uploadButton, .submit_btn {
    background-color: #003944;
    color: #fff;
    border: none;
    padding: 10px 35px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 16px;
    width: 100%;
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 16px;
    transition: box-shadow 0.3s ease;
}

#uploadButton:hover, .submit_btn:hover {
    box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);
}

#uploadButton.disabled, .submit_btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
footer {
    width: 100%;
    text-align: right;
    margin-top: 20px;
    padding: 20px 0;
    font-size: 12px;
    display:  none;
}

footer a {
    color: inherit;
    text-decoration: underline;
    font-weight: 700;
    font-size: inherit;
    margin: 0;
}


.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #66bb6a;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
}

.checkmark-icon {
    font-size: 40px;
    color: white;
    font-weight: bold;
}


.rating-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 20px 0;
    line-height: 1.4;
}

.rating-container {
    text-align: center;
    margin: 20px 0;
}

.stars {
    display: inline-block;
    font-size: 0;
}

.star {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
    margin: 0 2px;
    user-select: none;
}

.star:hover,
.star.active {
    color: #ffc107;
}

.star:hover ~ .star {
    color: #ddd;
}

.comment-section {
    margin: 20px 0;
}

.comment-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}

.comment-section textarea:focus {
    outline: 2px solid #3867E5;
    outline-offset: 0;
    border-color: #3867E5;
    box-shadow: 0 0 0 2px rgba(56,103,229,0.15);
}

@media (min-width: 601px) {
    body {
        background-image: url('../img/bg.png');
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
    }
}

@media (max-width: 600px) {
    body {
        background-image: none;
        background-color: #ffffff;
        background-attachment: scroll;
    }
    .content {
        align-items: stretch;
        width: 100%;
        padding-right: 0;
    }
    
    .card-header {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;

        padding-top: 48px;

        gap: 14px;
        margin-bottom: 16px;
    }

    .card-header .back-link {
        position: absolute;
        top: 10px;
        left: 10px;
        line-height: 1;
        padding: 6px 8px;
    }

    .card-header #banner {
        width: 100%;
        display: flex;
        justify-content: center;
        margin: 0;
        margin-top: 6px;
    }

    .logo {
        display: block;
        margin: 0 auto;
        margin-top: 6px;
    }
    
    .card-title {
        margin-top: 6px;
    }
    
    .form-card {
        max-width: none;
        width: auto;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        border: none;
        padding: 10px;
        margin: 0 10px;
    }
    #banner {
        max-width: none;
        min-width: 0;
        width: 100%;
    }
    
    .radio-group {
        gap: 4px;
    }
    
    #messageTypeRadioGroup {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 12px;
        align-items: center;
        width: 100%;
    }
    
    #messageTypeRadioGroup .radio-option {
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        padding: 14px 14px;
        font-size: 15px;
        justify-content: center;
        text-align: center;
    }
    
    #messageTypeRadioGroup .radio-label {
        flex: 0 1 auto;
        text-align: center;
        margin: 0;
    }
    
    #messageTypeRadioGroup .radio-icon {
        margin: 0;
        min-width: 22px;
    }
    
    #messageTypeRadioGroup { gap: 14px; }

    #messageTypeRadioGroup .radio-option {
        max-width: 380px;
        padding: 16px 16px;
        border-radius: 12px;
        border: 1px solid #e6e6e6;
        background: #fbfbfb;
        box-shadow: 0 1px 0 rgba(0,0,0,0.04);
        transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    }

    #messageTypeRadioGroup .radio-label {
        font-size: 16px;
        font-weight: 600;
        line-height: 1.25;
        color: #222;
    }

    #messageTypeRadioGroup .radio-icon {
        font-size: 18px;
        min-width: 24px;
    }

    #messageTypeRadioGroup .radio-option:active {
        transform: scale(0.99);
        box-shadow: 0 0 0 rgba(0,0,0,0);
    }

    #messageTypeRadioGroup .radio-option:has(input[type="radio"]:checked) {
        background: #eef6f7;
        border-color: #003944;
        box-shadow: 0 2px 10px rgba(0,57,68,0.10);
    }
    
    #contactTypeRadioGroup {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 6px;
    }
    
    #contactTypeRadioGroup .radio-option {
        padding: 3px 5px;
        font-size: 9px;
        max-width: 100px;
    }
    
    .radio-label {
        font-size: 11px;
    }
    
    .radio-icon {
        font-size: 14px;
        margin-left: 2px;
        margin-right: 2px;
        min-width: 18px;
    }
    
    body.form-mode .content {
        justify-content: flex-start;
        align-items: center;
        padding-top: 10px;
    }

    body.form-mode #messageTypeRadioGroup {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: stretch;
        gap: 8px;
        width: 100%;
    }

    body.form-mode #messageTypeRadioGroup .radio-option {
        flex: 1 1 0;
        width: 0;
        max-width: none;
        padding: 8px 6px;
        border-radius: 10px;
        justify-content: center;
        text-align: center;

        min-width: 0;
        white-space: normal;
    }

    body.form-mode #messageTypeRadioGroup .radio-label {
        font-size: 11px;
        font-weight: 700;
        line-height: 1.05;
        text-align: center;
        margin: 0;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        
        word-break: break-word;
    }

    body.form-mode #messageTypeRadioGroup .radio-icon {
        font-size: 13px;
        min-width: 14px;
        margin: 0;
    }

    body.form-mode .form-card,
    body.form-mode .content,
    body.form-mode #uploadForm {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.form-mode #messageTypeRadioGroup {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-width: 0;
    }

    body.form-mode #messageTypeRadioGroup .radio-option {
        min-width: 0 !important;
        max-width: 100%;
        overflow: hidden;
    }

    body.form-mode #messageTypeRadioGroup .radio-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 360px) {
    body.form-mode #messageTypeRadioGroup {
        flex-wrap: wrap;
    }
    body.form-mode #messageTypeRadioGroup .radio-option {
        flex: 1 1 calc(50% - 10px);
    }
}

@media (max-width: 410px) {
    .radio-group {
        gap: 2px;
    }

    #contactTypeRadioGroup .radio-option {
        padding: 4px 6px;
        font-size: 10px;
        max-width: 85px;
    }

    .radio-label {
        font-size: 10px;
        margin-right: 4px;
    }

 
}

/* ============================================================
   DARK MODE — "Have your say" outage story form (Figma 240:330)
   English / LTR. Farsi (RTL) variant to come later.
   ============================================================ */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

body.theme-dark {
    background-color: #000000;
    background-image: none;
    color: #ffffff;
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    align-items: center;
    padding: 16px 16px;
}

body.theme-dark .content {
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding-right: 0;
}

body.theme-dark .story-card {
    width: 100%;
    max-width: 472px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* hero + CTA form a self-contained above-the-fold view, vertically
   centered so it looks good on tall phones too. */
body.theme-dark .content {
    min-height: 100vh;
    min-height: 100svh;
    justify-content: center;
}

/* form is hidden until the CTA reveals it */
.submit-widget[hidden] {
    display: none !important;
}
.submit-widget.is-revealed {
    animation: revealForm 0.35s ease both;
}

/* hero + CTA are removed from layout once the form is revealed */
.story-hero[hidden],
.story-cta-wrap[hidden] {
    display: none !important;
}
@keyframes revealForm {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .submit-widget.is-revealed { animation: none; }
}





/* ---- hero ---- */
.story-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 315px;
    text-align: center;
}

.story-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.25;
    color: #ffffff;
    margin: 0;
}

.story-image {
    width: 240px;
    max-width: 100%;
    border-radius: 28px;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: auto;
    display: block;
}

.story-blurb {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
    color: #ffffff;
    margin: 0;
}

/* ---- "Have your say" CTA ---- */
.story-cta-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

.story-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: auto;
    min-width: min(267px, 100%);
    max-width: 100%;
    min-height: 55px;
    padding: 12px 24px;
    box-sizing: border-box;
    border-radius: 10px;
    background: linear-gradient(to right, #ff7014, #f24700);
    box-shadow: 0 8px 12px rgba(255, 102, 13, 0.4);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.story-cta:hover {
    box-shadow: 0 10px 18px rgba(255, 102, 13, 0.55);
    transform: translateY(-1px);
}

.story-cta span {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.3;
}

html[dir="rtl"] .story-cta span {
    font-family: 'Noto Sans Arabic', sans-serif;
}

.story-cta-logo {
    width: 33px;
    height: 33px;
    flex: 0 0 auto;
    object-fit: contain;
}

/* ---- submit widget ---- */
.submit-widget {
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    background: #0e0e16;
    border: 0.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 14px 28px 22px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    scroll-margin-top: 20px;
}

.submit-lock {
    align-self: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 107, 20, 0.18);
    border: 1px solid rgba(255, 107, 20, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 4px;
}

.submit-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #ff6f14;
    text-align: center;
    margin: 0 0 8px;
}

.submit-subheading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
    line-height: 1.35;
    margin: 0 0 16px;
}

body.theme-dark #uploadForm {
    display: block;
    width: 100%;
}

.field-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #ff6b14;
    margin-bottom: 8px;
}

body.theme-dark #comment {
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #ffffff;
    resize: vertical;
    margin-bottom: 6px;
}

body.theme-dark #comment::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

body.theme-dark #comment:focus {
    outline: none;
    border-color: rgba(255, 111, 20, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 111, 20, 0.18);
}

.char-count {
    text-align: right;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.22);
    margin-bottom: 12px;
}

.submit-licence {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    line-height: 15px;
    color: rgba(255, 255, 255, 0.32);
    margin: 0 0 14px;
}

body.theme-dark .submit_btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(to right, #ff7014, #f24700);
    box-shadow: 0 8px 24px -4px rgba(255, 102, 13, 0.4);
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin: 0 0 16px;
    transition: box-shadow 0.2s ease, transform 0.12s ease;
}

body.theme-dark .submit_btn:hover {
    box-shadow: 0 12px 28px -4px rgba(255, 102, 13, 0.55);
    transform: translateY(-1px);
}

body.theme-dark .submit_btn {
    margin-bottom: 12px;
}

body.theme-dark .submit_btn.disabled,
body.theme-dark .submit_btn:disabled {
    background: #555;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.submit-footer {
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.22);
    margin: 0;
}

/* overlays on dark bg */
body.theme-dark #upload-processing {
    background: rgba(0, 0, 0, 0.8);
    color: #ff6f14;
}

/* dark-mode thanks page reuses .submit-widget; extra bits below */
.thanks-check {
    align-self: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(to right, #ff7014, #f24700);
    box-shadow: 0 8px 24px -4px rgba(255, 102, 13, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #ffffff;
    margin: 8px 0 18px;
}

.thanks-message {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin: 0 0 22px;
}

.thanks-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    border-radius: 10px;
    background: linear-gradient(to right, #ff7014, #f24700);
    box-shadow: 0 8px 24px -4px rgba(255, 102, 13, 0.4);
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.12s ease;
}

.thanks-home-btn:hover {
    box-shadow: 0 12px 28px -4px rgba(255, 102, 13, 0.55);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .submit-widget { padding: 14px 18px 24px; }
}

/* reCAPTCHA inside the dark submit widget */
body.theme-dark #recaptchaContainer.recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 14px;
    min-height: 78px;
}
body.theme-dark .recaptcha-wrap .g-recaptcha {
    transform-origin: center;
}
@media (max-width: 360px) {
    body.theme-dark .recaptcha-wrap .g-recaptcha {
        transform: scale(0.92);
    }
}

/* ---- RTL / Farsi adjustments for the dark story form ---- */
body.theme-dark[dir="rtl"],
html[dir="rtl"] body.theme-dark {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
}

html[dir="rtl"] .story-title,
html[dir="rtl"] .story-blurb,
html[dir="rtl"] .submit-subheading,
html[dir="rtl"] .submit-licence,
html[dir="rtl"] .thanks-message {
    font-family: 'Noto Sans Arabic', sans-serif;
    text-align: right;
}

html[dir="rtl"] .submit-heading,
html[dir="rtl"] .field-label {
    font-family: 'Noto Sans Arabic', sans-serif;
}

html[dir="rtl"] .field-label {
    text-align: right;
}

html[dir="rtl"] #comment {
    text-align: right;
    font-family: 'Noto Sans Arabic', sans-serif;
}

/* char count sits on the opposite side in RTL */
html[dir="rtl"] .char-count {
    text-align: left;
}

html[dir="rtl"] .story-cta span,
html[dir="rtl"] .submit_btn,
html[dir="rtl"] .thanks-home-btn {
    font-family: 'Noto Sans Arabic', sans-serif;
}

/* keep the English "Powered by Psiphon" footer LTR even on RTL page */
.submit-footer {
    direction: ltr;
}

/* thanks.html: short, centered card */
body.thanks-page {
    justify-content: center;
}
body.thanks-page .content {
    justify-content: center;
    align-items: center;
    padding-right: 0;
    min-height: 100vh;
}
body.thanks-page .story-card {
    margin: auto;
    gap: 0;
}
body.thanks-page .submit-widget {
    text-align: center;
}
body.thanks-page .submit-subheading {
    margin-bottom: 4px;
    white-space: normal;
    overflow-wrap: anywhere;
}
body.thanks-page .thanks-home-btn {
    margin-top: 22px;
}
