/* ============================================
   GLOBAL
   ============================================ */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    background-color: #f5f5f5;
    color: #222222;
    font-family: Arial, sans-serif;
}


/* ============================================
   HEADER
   ============================================ */

header {
    background: linear-gradient(135deg, #111111, #292929);
    color: white;
    text-align: center;
    padding: 55px 20px;
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.logo img {
    width: 180px;
    max-width: 80%;
    height: auto;
    display: block;
}

header p {
    margin: 0;
    color: #dddddd;
}


/* ============================================
   MAIN
   ============================================ */

main {
    width: 100%;
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}


/* ============================================
   FORM CARD
   ============================================ */

.form-card {
    width: 100%;
    background-color: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-card h2 {
    margin-top: 0;
    font-size: 30px;
    line-height: 1.2;
}

.form-card p {
    color: #666666;
    line-height: 1.6;
}


/* ============================================
   FORM GROUP
   ============================================ */

.form-group {
    margin-top: 25px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #888888;
    line-height: 1.4;
}


/* ============================================
   ALL FORM CONTROLS
   ============================================ */

.form-group input,
.form-group select,
.form-group textarea {
    font-family: inherit;
    font-size: 16px;
}


/* ============================================
   TEXT / URL / PASSWORD INPUTS
   ============================================ */

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"] {
    width: 100%;
    min-height: 50px;
    padding: 14px 15px;
    border: 1px solid #dddddd;
    border-radius: 12px;
    background-color: #ffffff;
    color: #222222;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="password"]:focus {
    border-color: #111111;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* ============================================
   PASSWORD SCREEN
   ============================================ */

.password-screen {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 30px 0;
}

.password-card {
    width: 100%;
    max-width: 430px;
    padding: 40px 32px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.password-icon {
    font-size: 42px;
    line-height: 1;
    margin-bottom: 18px;
}

.password-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

.password-card p {
    margin: 0 0 28px;
    color: #777777;
    line-height: 1.6;
}

.password-card .form-group {
    text-align: left;
}

#submission-password {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;

    border: 1px solid #d9d9d9;
    border-radius: 12px;

    background-color: #ffffff;
    color: #222222;

    /*
       Keep this at 16px.
       This prevents iPhone Safari from
       zooming when the user taps the field.
    */
    font-size: 16px;

    font-family: inherit;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

#submission-password::placeholder {
    color: #999999;
}

#submission-password:focus {
    border-color: #111111;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

#password-message {
    margin-top: 15px;
    line-height: 1.4;
}

#password-message.error {
    color: #b42318;
}

#password-message.success {
    color: #176b36;
}


/* ============================================
   SELECT
   ============================================ */

.form-group select {
    width: 100%;
    min-height: 50px;
    padding: 14px 15px;

    border: 1px solid #dddddd;
    border-radius: 12px;

    font-size: 16px;
    background-color: white;
    color: #222222;

    box-sizing: border-box;
    cursor: pointer;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group select:focus {
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* ============================================
   PRICE
   ============================================ */

.price-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.price-row select {
    width: 120px;
    min-height: 50px;
    padding: 14px 15px;

    border: 1px solid #dddddd;
    border-radius: 12px;

    font-size: 16px;
    background-color: white;

    box-sizing: border-box;
    outline: none;
}

.price-row input {
    flex: 1;
    width: 0;
    min-height: 50px;
    padding: 14px 15px;

    border: 1px solid #dddddd;
    border-radius: 12px;

    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

.price-row select:focus,
.price-row input:focus {
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* ============================================
   TEXTAREA
   ============================================ */

.form-group textarea {
    width: 100%;
    min-height: 130px;

    padding: 15px;

    border: 1px solid #dddddd;
    border-radius: 12px;

    font-size: 16px;
    font-family: inherit;

    box-sizing: border-box;
    resize: vertical;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group textarea:focus {
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* ============================================
   UPLOAD AREA
   ============================================ */

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 180px;

    padding: 25px;

    border: 2px dashed #cccccc;
    border-radius: 16px;

    background-color: #fafafa;

    cursor: pointer;
    text-align: center;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.upload-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 10px;
}

.upload-title {
    font-size: 17px;
    font-weight: bold;
    color: #222222;
}

.upload-text {
    margin-top: 6px;
    font-size: 14px;
    color: #888888;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-area:hover {
    border-color: #111111;
    background-color: #f3f3f3;
}

.upload-area:focus-within {
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* ============================================
   IMAGE PREVIEW
   ============================================ */

#image-preview {
    width: 100%;
    margin-top: 15px;
}

#image-preview img {
    width: 100%;
    max-height: 350px;

    object-fit: cover;

    border-radius: 15px;

    display: block;
}


/* ============================================
   CONSENT
   ============================================ */

.consent {
    margin-top: 20px;
    font-size: 14px;
    color: #666666;
}

.consent label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.consent input {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    cursor: pointer;
}


/* ============================================
   BUTTON
   ============================================ */

.submit-button {
    width: 100%;

    min-height: 52px;

    padding: 15px 16px;
    margin-top: 25px;

    border: none;
    border-radius: 12px;

    background-color: #111111;
    color: white;

    font-size: 17px;
    font-weight: bold;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.submit-button:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}


/* ============================================
   FORM MESSAGE
   ============================================ */

#form-message {
    margin-top: 20px;
    padding: 15px;

    border-radius: 12px;

    display: none;

    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

#form-message.success {
    display: block;
    background-color: #eaf8ef;
    color: #176b36;
}

#form-message.error {
    display: block;
    background-color: #fff0f0;
    color: #b42318;
}


/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 600px) {

    body {
        font-size: 16px;
    }


    /* HEADER */

    header {
        padding: 35px 15px;
    }

    .logo img {
        width: 150px;
        max-width: 75%;
    }

    header p {
        font-size: 14px;
    }


    /* MAIN */

    main {
        width: 100%;
        margin: 20px auto;
        padding: 0 10px;
    }


    /* FORM CARD */

    .form-card {
        padding: 25px 18px;
        border-radius: 16px;
    }

    .form-card h2 {
        font-size: 25px;
    }


    /* PASSWORD SCREEN */

    .password-screen {
        min-height: 70vh;
        padding: 10px 0;
    }

    .password-card {
        padding: 30px 20px;
        border-radius: 18px;
    }

    .password-icon {
        font-size: 38px;
    }

    .password-card h2 {
        font-size: 24px;
    }

    .password-card p {
        font-size: 15px;
    }


    /* ALL INPUTS */

    .form-group input[type="text"],
    .form-group input[type="url"],
    .form-group input[type="password"],
    .form-group select,
    .form-group textarea,
    .price-row input,
    .price-row select {

        /*
           16px prevents iPhone Safari
           from automatically zooming in.
        */

        font-size: 16px;

        min-height: 50px;
    }


    /* PRICE */

    .price-row {
        flex-direction: row;
        gap: 8px;
    }

    .price-row select {
        width: 40%;
    }

    .price-row input {
        width: 60%;
    }


    /* UPLOAD */

    .upload-area {
        min-height: 160px;
        padding: 20px 15px;
    }

    .upload-icon {
        font-size: 36px;
    }


    /* BUTTON */

    .submit-button {
        min-height: 52px;
        font-size: 16px;
    }


    /* MESSAGE */

    #form-message {
        font-size: 14px;
    }

}


/* ============================================
   VERY SMALL PHONES
   ============================================ */

@media (max-width: 380px) {

    main {
        padding: 0 7px;
    }

    .form-card {
        padding: 22px 15px;
    }

    .password-card {
        padding: 28px 17px;
    }

    .price-row {
        gap: 6px;
    }

}
