/* ==============================
   MODERN MODAL FORMS STYLES
   ============================== */

/* Modal Header */
.modal-header-modern {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    border-radius: 0;
    padding: 18px 20px;
    border-bottom: none;
}

.modal-header-modern .close {
    color: white;
    opacity: 0.8;
    text-shadow: none;
}

.modal-header-modern .close:hover {
    opacity: 1;
}

.modal-header-modern .modal-title {
    font-weight: 600;
    font-size: 18px;
}

.modal-header-modern .modal-title i {
    margin-right: 10px;
}

/* Modal Body */
.modal-body-modern {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1565c0;
}

.form-section-header i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.form-section-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1565c0;
    font-size: 16px;
}

/* Form Groups */
.form-section .form-group {
    margin-bottom: 15px;
}

.form-section .form-group:last-child {
    margin-bottom: 0;
}

.form-section .form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
    font-size: 13px;
    display: block;
}

.form-section .form-group label i {
    margin-right: 6px;
    color: #6c757d;
}

/* Form Controls */
.form-section .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    min-height: 48px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.form-section .form-control:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
    outline: none;
}

.form-section .form-control:read-only {
    background-color: #e9ecef;
}

/* Select Styling */
.form-section select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 40px;
    background-color: white;
}

/* Textarea */
.form-section textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Required Field Marker */
.required-field::after {
    content: ' *';
    color: #dc3545;
}

/* Photo Upload Area */
.photo-upload-area {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.photo-upload-area:hover {
    border-color: #1565c0;
    background: rgba(21, 101, 192, 0.02);
}

.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #1565c0;
    flex-shrink: 0;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid #1565c0;
}

.photo-placeholder i {
    font-size: 32px;
    color: #1565c0;
}

.photo-upload-info {
    flex: 1;
}

.photo-upload-info p {
    margin: 0 0 8px 0;
    font-weight: 500;
    color: #495057;
}

.photo-upload-info small {
    color: #6c757d;
    display: block;
    margin-top: 5px;
}

/* Parent Cards */
.parent-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    height: 100%;
}

.parent-card.father {
    border-left: 4px solid #1565c0;
}

.parent-card.mother {
    border-left: 4px solid #e91e63;
}

.parent-card h6 {
    margin-bottom: 15px;
    font-weight: 600;
}

.parent-card.father h6 {
    color: #1565c0;
}

.parent-card.mother h6 {
    color: #e91e63;
}

/* Modal Footer */
.modal-footer-modern {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

.modal-footer-modern .btn {
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-footer-modern .btn-success {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    border: none;
}

.modal-footer-modern .btn-success:hover {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    transform: translateY(-1px);
}

.modal-footer-modern .btn-default {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.modal-footer-modern .btn-default:hover {
    background: #e9ecef;
}

/* Info Cards */
.info-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1565c0;
}

.info-card-header i {
    font-size: 18px;
}

/* Color Variants for Section Headers */
.form-section-header.green i {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
}

.form-section-header.green {
    border-bottom-color: #43a047;
}

.form-section-header.green h5 {
    color: #2e7d32;
}

.form-section-header.orange i {
    background: linear-gradient(135deg, #fb8c00 0%, #ef6c00 100%);
}

.form-section-header.orange {
    border-bottom-color: #fb8c00;
}

.form-section-header.orange h5 {
    color: #ef6c00;
}

.form-section-header.purple i {
    background: linear-gradient(135deg, #7b1fa2 0%, #6a1b9a 100%);
}

.form-section-header.purple {
    border-bottom-color: #7b1fa2;
}

.form-section-header.purple h5 {
    color: #6a1b9a;
}

/* Inline Form Row */
.form-row-inline {
    display: flex;
    gap: 15px;
}

.form-row-inline .form-group {
    flex: 1;
}

/* Status Badge in Forms */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-indicator.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-indicator.inactive {
    background: #ffebee;
    color: #c62828;
}

/* Checkbox & Radio Styling */
.form-section .checkbox-modern,
.form-section .radio-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
}

.form-section .checkbox-modern:hover,
.form-section .radio-modern:hover {
    border-color: #1565c0;
    background: rgba(21, 101, 192, 0.02);
}

.form-section .checkbox-modern input,
.form-section .radio-modern input {
    width: 18px;
    height: 18px;
    accent-color: #1565c0;
}

/* Date/Time Inputs */
.form-section input[type="date"],
.form-section input[type="time"],
.form-section input[type="datetime-local"] {
    cursor: pointer;
}

/* Number Input with Spinners */
.form-section input[type="number"] {
    -moz-appearance: textfield;
}

.form-section input[type="number"]::-webkit-outer-spin-button,
.form-section input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* File Input */
.form-section input[type="file"] {
    padding: 8px;
    font-size: 13px;
}

/* Help Text */
.form-section .help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-section {
        padding: 15px;
    }

    .photo-upload-area {
        flex-direction: column;
        text-align: center;
    }

    .parent-card {
        margin-bottom: 15px;
    }

    .form-row-inline {
        flex-direction: column;
        gap: 0;
    }
}
