/* Main container */
.hr-teacher-wrapper input[type="text"],
.hr-teacher-wrapper input[type="password"],
.hr-teacher-wrapper input[type="tel"],
.hr-teacher-wrapper input[type="url"],
.hr-teacher-wrapper input[type="number"],
.hr-teacher-wrapper input[type="date"], 
.hr-teacher-wrapper select,
.hr-teacher-wrapper textarea {
    max-width: none !important; 
    width: 100% !important;
    font-family: Qatar, sans-serif !important; 
}

/* Override Auxin theme container limitations */
.hr-teacher-wrapper .aux-resp.aux-hd .aux-fold,
.hr-teacher-wrapper .aux-resp.aux-hd .aux-fold-width,
.hr-teacher-wrapper .aux-resp.aux-hd .aux-boxed-container > .aux-container,
.hr-teacher-wrapper .aux-container,
.hr-teacher-wrapper .aux-fold,
.hr-teacher-wrapper .aux-fold-width {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Additional Auxin container overrides */
.aux-resp.aux-hd .aux-fold, 
.aux-resp.aux-hd .aux-fold-width, 
.aux-resp.aux-hd .aux-boxed-container > .aux-container {
    width: auto !important;
    max-width: none !important;
    margin-top: -110px;
    margin-bottom: -80px;
}

/* Force our container to be full width */
.hr-teacher-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
    min-height: 100vh;
    padding: 0;
    background: linear-gradient(135deg, #8a092f 0%, #b91c47 100%);
    font-family: Qatar, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Background image with top curved effect */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, rgba(138, 9, 47, 0.9), rgba(185, 28, 71, 0.8)), 
                url('../images/teacher-bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
    border-bottom-left-radius: 50% 60px;
    border-bottom-right-radius: 50% 60px;
}

/* Form container */
.hr-teacher-container {
    max-width: 900px;
    width: 95%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
    margin-top: 150px;
    padding-bottom: 50px;
}

/* Form styling */
.hr-teacher-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    direction: rtl;
    font-family: Qatar, sans-serif;
    position: relative;
    overflow: hidden;
}

.hr-teacher-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #8a092f, #b91c47, #8a092f);
    z-index: 1;
}

.hr-teacher-form h2 {
    text-align: center;
    color: #8a092f;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
    font-family: Qatar, sans-serif;
}

.hr-teacher-form h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 35%;
    right: 35%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8a092f, transparent);
    border-radius: 2px;
}

/* Form sections */
.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.form-section h3 {
    color: #8a092f;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #8a092f;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form fields styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    position: relative;
}

.form-group label::before {
    content: '✦';
    color: #8a092f;
    margin-left: 5px;
    font-size: 12px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    text-align: right;
    background-color: #fff;
    transition: all 0.3s ease;
    font-family: Qatar, sans-serif;
    position: relative;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8a092f;
    box-shadow: 0 0 0 3px rgba(138, 9, 47, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b91c47;
}

/* Select styling */
.form-group select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%238a092f'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 20px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-left: 50px;
    cursor: pointer;
}

.form-group select option {
    padding: 10px;
    font-family: Qatar, sans-serif;
}

/* Textarea styling */
.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Required field indicator */
.form-group label:has(+ input[required])::after,
.form-group label:has(+ select[required])::after,
.form-group label:has(+ textarea[required])::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

/* Work conditions section */
.work-conditions {
    background: linear-gradient(135deg, #fff5f5, #ffeaea);
    border: 2px solid #8a092f;
}

.conditions-text {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #8a092f;
}

.conditions-text p {
    margin-bottom: 15px;
    font-weight: bold;
    color: #8a092f;
    font-size: 16px;
}

.conditions-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.conditions-text li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-right: 25px;
}

.conditions-text li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 16px;
}

.conditions-text li:last-child {
    border-bottom: none;
}

/* Form actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.submit-btn {
    background: linear-gradient(135deg, #8a092f, #b91c47);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Qatar, sans-serif;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(138, 9, 47, 0.3);
    min-width: 200px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(138, 9, 47, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error messages */
.form-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
    .hr-teacher-container {
        width: 98%;
        margin-top: 100px;
        padding: 10px;
    }
    
    .hr-teacher-form {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .hr-teacher-form h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .form-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .form-section h3 {
        font-size: 18px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 15px 40px;
        font-size: 16px;
        width: 100%;
        max-width: 300px;
    }
    
    .background-image {
        height: 300px;
        border-bottom-left-radius: 50% 40px;
        border-bottom-right-radius: 50% 40px;
    }
}

@media (max-width: 480px) {
    .hr-teacher-form {
        padding: 20px 15px;
    }
    
    .form-section {
        padding: 15px 10px;
    }
    
    .conditions-text {
        padding: 15px;
    }
    
    .conditions-text li {
        font-size: 14px;
        padding: 6px 0;
        padding-right: 20px;
    }
}

/* Animation for form sections */
.form-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }
.form-section:nth-child(6) { animation-delay: 0.6s; }
.form-section:nth-child(7) { animation-delay: 0.7s; }
.form-section:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input validation styles */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group .error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* WhatsApp validation styles */
.form-group .loading-message {
    color: #f39c12;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

.form-group input.checking {
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><style>@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}</style><circle cx="12" cy="12" r="10" fill="none" stroke="%23f39c12" stroke-width="2" stroke-linecap="round" stroke-dasharray="31.416" stroke-dashoffset="31.416"><animateTransform attributeName="transform" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Enhanced error styling for uniqueness validation */
.form-group .uniqueness-error {
    color: #c0392b;
    font-weight: bold;
    background-color: #fdf2f2;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 4px solid #e74c3c;
    margin-top: 8px;
    display: block;
    font-size: 13px;
}

/* Admin styles */
.htr-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.htr-search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.htr-search-box input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.htr-search-box button {
    padding: 8px 16px;
    background: #8a092f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.htr-search-box button:hover {
    background: #6e0725;
}

/* Table styling */
.wp-list-table th,
.wp-list-table td {
    text-align: right;
}

.wp-list-table .button {
    margin-left: 5px;
}

.view-details {
    background: #8a092f !important;
    color: white !important;
    border-color: #8a092f !important;
}

.view-details:hover {
    background: #6e0725 !important;
    border-color: #6e0725 !important;
}

/* Date of birth field styling */
.date-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    position: relative;
}

.date-group label::before {
    content: '✦';
    color: #8a092f;
    margin-left: 5px;
    font-size: 12px;
}

.date-inputs-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

.date-input-item {
    flex: 1;
    max-width: 120px;
}

.date-input-item .sub-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 12px;
    text-align: center;
}

.date-input-item input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    text-align: center;
    background-color: #fff;
    transition: all 0.3s ease;
    font-family: Qatar, sans-serif;
    font-weight: 500;
}

.date-input-item input[type="number"]:focus {
    outline: none;
    border-color: #8a092f;
    box-shadow: 0 0 0 3px rgba(138, 9, 47, 0.1);
    transform: translateY(-1px);
}

.date-input-item input[type="number"]:hover {
    border-color: #b91c47;
}

.date-input-item input[type="number"]::-webkit-outer-spin-button,
.date-input-item input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.date-input-item input[type="number"][type=number] {
    -moz-appearance: textfield;
}

/* Hidden date input */
input[type="hidden"]#date_of_birth {
    display: none;
}

/* Responsive styling for date fields */
@media (max-width: 768px) {
    .date-inputs-wrapper {
        gap: 10px;
    }

    .date-input-item {
        max-width: 100px;
    }

    .date-input-item input[type="number"] {
        padding: 10px 12px;
        font-size: 13px;
    }

    .date-input-item .sub-label {
        font-size: 11px;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .date-inputs-wrapper {
        gap: 8px;
    }

    .date-input-item {
        max-width: 90px;
    }

    .date-input-item input[type="number"] {
        padding: 10px 10px;
        font-size: 12px;
        border-radius: 6px;
    }

    .date-input-item .sub-label {
        font-size: 10px;
        margin-bottom: 4px;
    }
}