/* irse-matricula/assets/style.css - CORREÇÃO DEFINITIVA (DESIGN SYSTEM) */

.irse-form-container {
    background: transparent;
    padding: 0;
    margin: 0;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.irse-form-container * {
    box-sizing: border-box;
}

/* --- CABEÇALHO --- */
.irse-form-header { 
    text-align: left; 
    margin-bottom: 2.5rem; 
    border-bottom: 1px solid #e0e0e0; 
    padding-bottom: 1.5rem; 
}
.irse-form-header h3 { 
    margin-bottom: 0.5rem; 
    font-size: 1.8rem; 
    color: #333; 
    font-weight: 700; 
    line-height: 1.2;
}
.irse-form-header p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}
.irse-required-note { 
    color: #d9534f; 
    font-size: 0.9rem; 
    font-weight: 600; 
    margin-top: 0.5rem;
    display: block;
}

/* --- CAMPOS --- */
.irse-form-group { margin-bottom: 1.5rem; }

.irse-label { 
    display: block; 
    font-weight: 600; 
    font-size: 1.1rem;
    margin-bottom: 0.5rem; 
    color: #212529;
    line-height: 1.6rem;
}
.irse-label.required::after { content: " *"; color: #dc3545; }

/* INPUTS & SELECTS - Estilo Base */
input[type=email], input[type=tel], input[type=text],
.irse-input, .irse-select, .flatpickr-input {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    height: 3.2rem;
    padding: 0.375rem 1rem;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.3rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

/* TEXTAREA */
.irse-textarea {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-height: 150px;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.3rem;
    transition: border-color 0.15s ease-in-out;
    resize: vertical;
    box-sizing: border-box;
}

/* ESTADO DE FOCO */
.irse-input:focus, .irse-select:focus, .irse-textarea:focus, .flatpickr-input:focus {
    color: #495057;
    background-color: #fff;
    border-color: #FFAE00;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(255, 174, 0, 0.25);
}

/* Select Seta Customizada */
.irse-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    white-space: normal;
    height: auto;
    min-height: 3.2rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
}

/* --- FLATPICKR CUSTOMIZATION --- */
.flatpickr-calendar {
    font-family: inherit !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, .flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, .flatpickr-day:focus, .flatpickr-day:hover, .flatpickr-day.prevMonthDay:hover, .flatpickr-day.nextMonthDay:hover, .flatpickr-day:focus, .flatpickr-day.prevMonthDay:focus, .flatpickr-day.nextMonthDay:focus {
    background: #FFAE00 !important;
    border-color: #FFAE00 !important;
    color: #fff !important;
}
.flatpickr-months .flatpickr-month {
    background: #f8f9fa !important;
    color: #333 !important;
    border-radius: 8px 8px 0 0 !important;
    height: 50px !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
}
.flatpickr-weekdays {
    background: #f8f9fa !important;
}
span.flatpickr-weekday {
    color: #666 !important;
    font-weight: 600 !important;
}

/* --- CHECKS & RADIOS --- */
.irse-options-group {
    padding-top: 5px;
}
.irse-check-item { 
    display: flex; 
    align-items: center; 
    margin-bottom: 0.8rem; 
    min-height: 1.5rem; 
    cursor: pointer;
}
.irse-check-item input { 
    width: 1.2rem; 
    height: 1.2rem; 
    margin-right: 0.8rem; 
    accent-color: #FFAE00; 
    cursor: pointer;
    flex-shrink: 0;
}
.irse-check-item label {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
}

/* --- UPLOAD & TÍTULOS --- */
.irse-upload-instructions {
    font-size: 1.2rem; /* Corrected Font Size */
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px; /* Added margin */
}

/* DROP ZONE (DESIGN MODERNO) */
.irse-drop-zone {
    background-color: #fcfcfc;
    border: 2px dashed #ced4da;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.irse-drop-zone:hover, .irse-drop-zone.dragover {
    background-color: #fffdf5;
    border-color: #FFAE00;
}

.irse-drop-zone.dragover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 174, 0, 0.1);
}

.irse-drop-zone-content .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #ced4da;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.irse-drop-zone:hover .dashicons, .irse-drop-zone.dragover .dashicons {
    color: #FFAE00;
}

.irse-drop-zone-content p {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.irse-drop-zone-info {
    font-size: 0.9rem;
    color: #888;
}

/* --- BOTÕES --- */
.irse-btn {
    display: inline-block;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: #FFAE00;
    color: #000;
    border: 1px solid transparent;
    padding: 0.8rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.15s ease-in-out;
    text-transform: uppercase;
}
.irse-btn:hover {
    background-color: #e69c00;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.irse-btn-secondary {
    background-color: #6c757d;
    color: #fff;
}
.irse-btn-secondary:hover {
    background-color: #5a6268;
    color: #fff;
}

/* --- WIZARD STEPS --- */
.irse-wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
    overflow-x: auto;
}
.irse-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 10px 5px;
    opacity: 0.6;
    transition: all 0.3s;
    min-width: 80px;
}
.irse-progress-step.active {
    opacity: 1;
    font-weight: bold;
    color: #333;
}
.irse-progress-step.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 3px;
    background-color: #FFAE00;
}
.step-num {
    display: block;
    width: 30px;
    height: 30px;
    background: #e0e0e0;
    border-radius: 50%;
    line-height: 30px;
    margin: 0 auto 5px;
    color: #fff;
    font-weight: 700;
}
.irse-progress-step.active .step-num {
    background: #FFAE00;
    color: #000;
}
.step-title {
    display: block;
    font-size: 1.1rem;
    line-height: 1.2;
}

.irse-step-content {
    display: none;
    animation: fadeIn 0.5s;
}
.irse-step-content.active {
    display: block;
}
.irse-step-title-mobile {
    display: none;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #FFAE00;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MENSAGENS DE VALIDAÇÃO --- */
.irse-step-error-msg {
    display: none;
    background: #fffdf5;
    border-left: 4px solid #FFAE00;
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: left;
    animation: fadeIn 0.4s ease;
}

.irse-error-header {
    display: flex;
    align-items: center;
    color: #856404;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.irse-error-header .dashicons {
    margin-right: 10px;
}
.irse-error-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}
.irse-error-list li {
    color: #666;
    margin-bottom: 5px;
    position: relative;
}
.irse-error-list li::before {
    content: "•";
    color: #FFAE00;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.irse-input-error {
    border-color: #FFAE00 !important;
    box-shadow: 0 0 0 1px rgba(255, 174, 0, 0.2) !important;
}

.irse-options-group.irse-input-error {
    background: #fffdf5;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #FFAE00;
}

.irse-step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.irse-prev-btn {
    background-color: #e0e0e0;
    color: #333;
}
.irse-prev-btn:hover {
    background-color: #d0d0d0;
}

/* --- FILE PREVIEW --- */
.irse-file-preview-list {
    text-align: left;
    margin-top: 15px;
}
.irse-file-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.irse-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}
.irse-file-size {
    font-size: 0.8rem;
    color: #888;
}

/* --- GENERIC MODAL --- */
.irse-modal-overlay.active {
    display: flex;
}

/* --- DOCUMENT UPLOAD MODAL --- */
.irse-doc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999; /* Increased z-index */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.irse-doc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.irse-doc-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.irse-doc-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.irse-doc-modal-header h4 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}
.irse-doc-modal-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
}

.irse-doc-modal-body {
    padding: 25px 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.irse-doc-progress {
    background-color: #e9ecef;
    border-radius: 50px;
    height: 10px;
    margin-bottom: 5px;
}
.irse-doc-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #FFAE00;
    border-radius: 50px;
    transition: width 0.4s ease;
}
.irse-doc-progress-text {
    text-align: center;
    font-size: 0.9rem;
    font-weight: bold;
    color: #666;
    margin-bottom: 20px;
}

#irse-doc-step-container h5 {
    font-size: 1.2rem;
    font-weight: 700;
}

.irse-doc-step-instructions {
    font-size: 1.05rem; /* Slightly increased font size */
    line-height: 1.6;
    background: #f8f9fa;
    padding: 15px 7px;
    border-radius: 5px;
    margin-bottom: 10px;
}
.irse-doc-step-instructions ul {
    padding-left: 20px;
    margin: 10px 0 0 0;
}

.irse-doc-drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.irse-doc-drop-zone.dragover {
    border-color: #FFAE00;
    background: #fffdf5;
}
.irse-doc-drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.irse-doc-drop-zone-content .dashicons {
    font-size: 52px; /* Increased size */
    color: #a0aec0; /* Softer color */
    margin-bottom: 15px;
    width: 52px;
    height: 52px;
}
.irse-doc-drop-zone-content p {
    margin: 5px 0;
    font-weight: 600;
}
.irse-doc-drop-zone-info {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
}
.irse-doc-select-file-btn {
    margin-top: 10px;
}

.irse-doc-file-preview {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.irse-doc-file-preview .irse-file-name {
    font-weight: bold;
}
.irse-doc-file-preview .irse-remove-file {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.5rem;
    cursor: pointer;
}

.irse-doc-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    border-bottom-left-radius: 8px; /* Added radius */
    border-bottom-right-radius: 8px; /* Added radius */
}

/* Status text on main form */
#irse-docs-upload-status.irse-docs-upload-status-complete {
    font-weight: bold;
    color: #28a745;
    margin-top: 15px;
    padding: 15px;
    background: #eaf6ec;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    text-align: center;
}

/* --- MENSAGENS DE SUCESSO --- */
.irse-success-container {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin: auto;
    max-width: 800px;
}
.irse-success-title {
    color: #28a745;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
}
.irse-success-container p {
    font-size: 1.3rem;
    line-height: 1.5;
    color: #495057;
}

/* Responsive */
@media (max-width: 576px) {
    .step-title { display: none; }
    .irse-step-title-mobile { display: block; }
    .irse-step-actions { flex-direction: column-reverse; gap: 10px; }
    .irse-prev-btn, .irse-next-btn, .irse-submit-btn, .irse-btn { width: 100%; margin: 0; }
}
