/* ============================================
   ID Form Styles
   ============================================ */

/* ID Form Wrapper */
.id-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ID Form Header */
.id-form-header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

/* ID Form Two Column */
.id-form-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: 100%;
    margin-bottom: 30px;
}

/* ID Form Card */
.id-form-card {
    padding: 40px 45px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: none;
    overflow: visible;
    width: 100%;
    max-width: 800px;
}

/* ID Form Section */
.id-form-section {
    margin-bottom: 20px;
}

/* ID Form Row (for 3-column layout) */
.id-form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Allow grid children to shrink to avoid overflow */
.id-form-row > * {
    min-width: 0;
}

/* ID Form Field */
.id-form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

/* ID Form Label */
.id-form-label {
    font-family: 'Karla', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #333333;
    margin-bottom: 8px;
    display: block;
}

/* View Form Value */
.view-form-value {
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #666666;
    margin: 0;
    padding: 12px 16px;
    background-color: #F8F8F8;
    border-radius: 8px;
    border: 1px solid #D0D0D0;
}

.required {
    color: #E74C3C;
    margin-left: 2px;
}

/* ID Form Input */
.id-form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: #F8F8F8;
    border: 1px solid #D0D0D0;
    border-radius: 8px;
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    color: #333333;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.id-form-input::placeholder {
    color: #999999;
}

.id-form-input:focus {
    outline: none;
    border-color: #FF7A00;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

.id-form-input:disabled {
    background-color: #F0F0F0;
    color: #999999;
    cursor: not-allowed;
}

/* ID Form Select */
.id-form-select {
    width: 100%;
    padding: 12px 16px;
    background-color: #F8F8F8;
    border: 1px solid #D0D0D0;
    border-radius: 8px;
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    color: #333333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Ensure the form itself never exceeds container width */
.id-form-wrapper form {
    width: 100%;
    max-width: 100%;
}

.id-form-select:focus {
    outline: none;
    border-color: #FF7A00;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}

/* File Upload */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.file-input {
    display: none;
}

.file-upload-label {
    padding: 10px 20px;
    background-color: #FF7A00;
    color: #FFFFFF;
    border-radius: 6px;
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.file-upload-label:hover {
    background-color: #CC6200;
}

.file-name {
    font-family: 'Karla', sans-serif;
    font-size: 14px;
    color: #666666;
}

/* Form Helper Text */
.form-helper-text {
    font-family: 'Karla', sans-serif;
    font-size: 12px;
    color: #999999;
    margin-top: 6px;
    margin-bottom: 0;
}

/* Form Error */
.form-error {
    font-family: 'Karla', sans-serif;
    font-size: 12px;
    color: #E74C3C;
    margin-top: 4px;
}

/* Submit Button */
.id-form-submit {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 24px;
}

.id-form-submit-btn {
    padding: 14px 50px;
    background-color: #FF7A00;
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 250px;
    text-decoration: none;
    display: inline-block;
}

.id-form-submit-btn:hover {
    background-color: #CC6200;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.3);
}

.id-form-submit-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .id-form-two-column {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .id-form-card {
        padding: 30px 35px;
    }

    /* Make multi-field rows easier to read on tablets */
    .id-form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .id-form-wrapper {
        padding: 20px 15px;
    }

    .id-form-card {
        padding: 25px 20px;
    }

    .id-form-row {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .id-form-submit-btn {
        width: 100%;
        min-width: auto;
    }

    /* Improve file upload layout and image preview scaling */
    .file-upload-wrapper {
        flex-wrap: wrap;
    }
    .file-upload-label {
        margin-bottom: 6px;
    }
    .file-name {
        font-size: 13px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    #image-preview {
        max-width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .id-form-card {
        padding: 20px 16px;
        border-radius: 10px;
    }
    .id-form-label {
        font-size: 13px;
    }
    .id-form-input,
    .id-form-select,
    .view-form-value {
        font-size: 13px;
        padding: 10px 12px;
    }
    .file-upload-wrapper {
        flex-wrap: wrap;
    }
    .file-upload-label {
        margin-bottom: 6px;
    }
    .file-name {
        font-size: 12px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    #image-preview {
        max-width: 100% !important;
        height: auto !important;
    }
    .id-form-submit-btn {
        padding: 12px 20px;
        font-size: 15px;
        width: 100%;
    }
}
