/*
    PDF STYLING
*/


/* Main passport */
.sp-passport {
    width: 1123px;
    min-height: 794px;
    box-sizing: border-box;
    padding: 40px;
    background: #ffffff;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 26px;
    font-weight: bold;
    color: #222222;
}

/* Passport title */
.sp-passport .sp-title {
    text-align: center;
    align-items: center;
}

/* Consonants / vowels headings */
.sp-passport .spelling-passport-table-title {
    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    width: 250px;
    height: 90px;

    background-color: #000000 !important;
    color: #ffffff !important;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;

    border: none;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
}

/* Ensure nested heading text stays white */
.sp-passport .spelling-passport-table-title * {
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Table cells */
.sp-passport .sp-table th,
.sp-passport .sp-table td {
    box-sizing: border-box;

    border: 2px solid black;
    background-color: #ffffff;

    padding: 5px;
    width: 50px;
    height: 100px;

    border-radius: 7px;
    text-align: center;
    vertical-align: top;
}

/* Column layout */
.sp-passport .sp-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Row layout */
.sp-passport .sp-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

/* GPCs found for this student */
.sp-passport .sp-green {
    display: inline-block;
    background-color: #71d17c !important;
    color: #222222;

    width: max-content;
    min-height: 25px;
    padding: 2px 4px;
    border-radius: 3px;
}

/* GPCs not found for this student */
.sp-passport .sp-red {
    display: inline-block;
    background-color: #d17171 !important;
    color: #222222;

    width: max-content;
    min-height: 25px;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Outlined grapheme letters */
.sp-passport .sp-outline-letter {
    display: inline;
    color: #ffffff !important;
    -webkit-text-stroke: 0.5px #000000;
}


/*
    FORM STYLING
*/

/* Main page */
.sp-generator {
    max-width: 760px;
    margin: 50px auto;
    padding: 20px;
    font-family: Arial, Helvetica, sans-serif;
    color: #172b4d;
}

/* Header */
.sp-header {
    text-align: center;
    margin-bottom: 32px;
}

.sp-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #e8efff;
    font-size: 30px;
    margin-bottom: 12px;
}

.sp-header h1 {
    font-size: clamp(28px, 5vw, 40px);
    margin: 0 0 12px;
    color: #172b4d;
    line-height: 1.2;
}

.sp-header p {
    max-width: 540px;
    margin: 0 auto;
    color: #667085;
    font-size: 16px;
    line-height: 1.6;
}

/* Upload card */
.sp-card {
    background: #ffffff;
    border: 1px solid #e1e7f0;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 12px 36px rgba(31, 50, 81, 0.08);
}

.sp-card h2 {
    margin: 0 0 10px;
    font-size: 23px;
    color: #172b4d;
}

.sp-description {
    margin: 0 0 24px;
    color: #667085;
    line-height: 1.6;
}

/* File picker */
.sp-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    border: 2px dashed #c8d5e8;
    border-radius: 12px;
    background: #f8faff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.sp-file-label:hover {
    border-color: #93ba3d;
    background: #f0f5ff;
}

.sp-upload-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e3ecff;
    color: #93ba3d;
    font-size: 26px;
}

#sp-file-name {
    color: #667085;
    font-size: 13px;
    overflow-wrap: anywhere;
}

#workbook {
    max-width: 100%;
    font-size: 14px;
}

/* Submit button */
.sp-submit {
    width: 100%;
    margin-top: 20px;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    background: #628c1e;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.sp-submit:hover {
    background: #93ba3d;
    transform: translateY(-1px);
}

.sp-submit:disabled {
    background: #8b9fc2;
    cursor: wait;
    transform: none;
}

/* Status and progress */
.sp-status {
    margin: 16px 0 0;
    text-align: center;
    font-size: 14px;
    color: #667085;
}

.sp-progress-container {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e7ebf2;
}

.sp-progress-container[hidden] {
    display: none;
}

.sp-progress-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}

#sp-progress-message {
    color: #344054;
}

#sp-progress-percent {
    color:#93ba3d;
}

.sp-progress-track {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 20px;
    background: #e7ecf4;
}

.sp-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: #93ba3d;
    transition: width 0.25s ease;
}

.sp-progress-detail {
    margin: 12px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 600px) {
    .sp-generator {
        margin: 20px auto;
        padding: 12px;
    }

    .sp-card {
        padding: 22px 18px;
    }
}
