/* css/teacher-form-style.css */
#teacherRegistrationForm {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
    direction: rtl; /* For RTL languages like Persian */
    text-align: right; /* For RTL languages */
}

#teacherRegistrationForm h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

#teacherRegistrationForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

#teacherRegistrationForm input[type="text"],
#teacherRegistrationForm input[type="date"],
#teacherRegistrationForm input[type="tel"],
#teacherRegistrationForm input[type="email"],
#teacherRegistrationForm input[type="number"],
#teacherRegistrationForm select,
#teacherRegistrationForm textarea {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding and border in element's total width/height */
    font-size: 16px;
    direction: rtl; /* For RTL languages */
}

#teacherRegistrationForm input[readonly] {
    background-color: #e9ecef; /* Grey background for readonly fields */
    opacity: 0.7;
    cursor: not-allowed;
}

#teacherRegistrationForm textarea {
    resize: vertical; /* Allow vertical resizing only */
}

#teacherRegistrationForm button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    margin-top: 20px;
}

#teacherRegistrationForm button[type="submit"]:hover {
    background-color: #0056b3;
}

#teacherRegistrationForm small {
    display: block;
    margin-top: -10px;
    margin-bottom: 15px;
    font-size: 0.85em;
    color: #777;
    text-align: right;
}

#teacherRegistrationForm small.required {
    color: #dc3545; /* Red for required small text */
    font-weight: bold;
}
.custom-file-upload-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    margin-top: 10px; /* Space from other elements */
}

.custom-file-upload-button:hover {
    background-color: #005177;
}

.custom-file-upload-button .dashicons {
    margin-left: 8px; /* For RTL support, otherwise use margin-right */
}

/* Image Preview Container */
.image-preview-container {
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    max-width: 250px; /* Adjust as needed */
}

.image-preview-container img {
    border: 1px solid #eee;
    padding: 5px;
    border-radius: 3px;
    background-color: #fff;
    display: block; /* Ensure image takes full width of its container if small */
    height: auto;
}

.image-preview-container .file-name-display {
    margin-top: 5px;
    font-size: 0.9em;
    color: #555;
    word-break: break-all; /* Break long file names */
}

/* Remove Image Button */
.remove-image-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff5555;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.remove-image-button:hover {
    opacity: 1;
    background: #cc0000;
}

.upload-hint {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    #teacherRegistrationForm {
        margin: 15px;
        padding: 15px;
    }
}