/* =========================
   Global Styles - Colour variables
========================= */
:root {
    --primary-color: #1F1646;
    --background-color: #f5f7fa;
    --secondary-color: #1B75BC;
    --accent-color: #00bfde;
    --error-color: #c0392b;
    --grey-accent: #d1d3d5;
}

/* =========================
   Base
========================= */

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: var(--background-color);
    margin: 0;
}


/* =========================
   Header
========================= */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    background-color: var(--primary-color);
    color: white;
    padding: 16px 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    gap: 16px;
}

/* Title */
.header-title {
    font-weight: 300;

    /* ✅ responsive + prevents bunching */
    font-size: clamp(12px, 1.6vw, 20px);

    line-height: 1.2;
    word-break: keep-all;
}

/* Logo */
.logo {
    height: clamp(50px, 4vw, 150px);
    max-height: 60px;
    object-fit: contain;
    transition: height 0.5s ease;

}


/* =========================
   Container (Card)
========================= */

.container {
    box-sizing: border-box;
    max-width: 500px;
    width: 95vw;    /* ✅ always 90% of viewport */
    

    margin-top: 40px;
    margin-inline: auto;
    background: white;
    padding: 24px;

    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);

    background: white;
    padding: 24px;

    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);

    transition: all 0.2s ease;
}

.container h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: clamp(16px, 3vw, 20px);
    color: var(--primary-color);
    position: relative;
    word-break: keep-all;
}


.primary-btn {

    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: white;

    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    transition: all 0.2s ease;

}

/* =========================
   Labels + Inputs
========================= */

label {
    display: block;
    margin-bottom: 16px;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 8px;
    margin-top: 6px;

    border: 1px solid var(--secondary-color);
    border-radius: 4px;
}

.select.options:focus {
    background-color: var(--secondary-color);
}

/* =========================
   Upload Box
========================= */

.upload-box {
    border: 2px dashed var(--grey-accent);
    padding: 28px 16px;
    margin: 15px 0;
    text-align: center;
    border-radius: 8px;

    cursor: pointer;
    transition: all 0.2s ease;

    background-color: #fafafa;
}

.upload-box:hover {
    border-color: var(--secondary-color);
    background-color: #f0f4f8;
}

.upload-box.dragover {
    border-color: var(--accent-color);
    background-color: #e6eef7;
}

.upload-box p {
    margin: 0;
    font-weight: 600;
}

.upload-box span {
    display: block;
    font-size: 13px;
    color: var(--grey-accent);
    margin-top: 4px;
}


/* =========================
   File Preview (Improved)
========================= */


.file-preview {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 14px;
    margin-bottom: 14px;
    padding: 10px 14px;

    background-color: var(--background-color);
    border: 1px solid var(--grey-accent);
    border-radius: 6px;

    font-size: 14px;

    transition: all 0.2s ease;
}


.file-preview.hidden {
    display: none;
}

.file-icon {
    font-size: 16px;
}

.file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

/* Remove button */
.remove-file {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 24px;
    width: 24px;

    background: none;
    border: none;

    font-size: 16px;
    line-height: 1;

    color: #888;
    cursor: pointer;
    border-radius: 4px;
}


.remove-file:hover {
    color: var(--error-color);
    background-color: rgba(0,0,0,0.05);
}



/* =========================
   Checkboxes (Fix alignment)
========================= */

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

.checkbox-row label {
    margin: 0;
    font-size: 14px;
}


/* =========================
   Button
========================= */

button {

padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}


/* =========================
   Error
========================= */

#error {
    margin-top: 14px;
    font-size: 13px;
    color: var(--error-color);
}


/* =========================
   Mobile polish
========================= */

@media (max-width: 700px) {
    .header {
        padding: 8px;
    }

    /* ✅ make container responsive */
    .container {
        margin: 20px auto;
        padding: 20px 16px;
        min-width: 90vw;
    }

    
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        word-break: keep-all;
        padding: 10px 20px;
        gap: 0;
    }

    /* ✅ make title slightly smaller so it fits better */
    .header-title {
        font-size: clamp(10px, 2vw, 28px);
    }

    /* ✅ grow logo again when stacked */
    .logo {
        height: clamp(50px, 10vw, 100px);
        margin-bottom: 8px;
    }
    
    button {
        padding: 14px;
        font-size: 15px;
    }

    input, select {
        padding: 10px;
    }

}
