/* Form Styles */
:root {
    --primary-color: #347554;
    --secondary-color: #db3022;
    --bg-light: #f6f6f6;
    --text-dark: #100d0e;
    --text-muted: #555;
    --border-color: #e7e7e7;
}

/* Form elements */
.form-control {
    display: block;
    width: 100%;
    height: 45px;
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #333;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 117, 84, 0.25);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 20px;
    transition: all 0.15s ease-in-out;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #2a5f44;
    border-color: #2a5f44;
}

/* Form layouts */
.login-form {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    max-width: 550px;
    margin: 0 auto;
}

.account-form {
    background-color: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Profile menu */
.profile_menu {
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.profile_link {
    display: block;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 10px;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile_link:hover, .profile_link.active_link {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* RTL specific adjustments */
html[lang="ar"] .form-control {
    text-align: right;
}

html[lang="ar"] .form-group label {
    text-align: right;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #f6f6f6;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
}

html[lang="ar"] .breadcrumb-item+.breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: 8px;
}

/* Save button */
.save_btn {
    margin-top: 15px;
    display: inline-block;
    min-width: 120px;
}

/* Media queries */
@media (max-width: 767px) {
    .login-form, .account-form {
        padding: 20px;
    }

    .breadcrumb {
        padding: 10px 15px;
    }
}

/* Fix for strange input behaviors */
input, select, textarea {
    direction: inherit;
}

/* Fix for input text reversal in RTL */
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], textarea {
    text-align: right;
}


/* Add these styles to your form-styles.css file */

/* Beneficiary row styling */
.beneficiary-row {
    background-color: #f7f7f7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    border: 1px solid #e0e0e0;
}

.remove-beneficiary {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    z-index: 2;
}

.remove-beneficiary label {
    display: flex;
    align-items: center;
    color: #dc3545;
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-beneficiary input[type="checkbox"] {
    margin-right: 5px;
}

/* Image preview container */
.image-preview-container {
    text-align: center;
    margin-top: 10px;
    min-height: 40px;
}

.image-preview-container img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Improved form layout spacing */
.form-row {
    margin-left: -10px;
    margin-right: -10px;
}

.form-group {
    margin-bottom: 1.5rem;
    padding-left: 10px;
    padding-right: 10px;
}

/* File upload styling */
input[type="file"].form-control {
    padding: 6px 12px;
    height: auto;
}

/* Custom colored headers */
.card-header.primary-header {
    background-color: var(--primary-color);
    color: #fff;
}

.card-header.secondary-header {
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

/* Improved checkbox styling */
.form-check {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.form-check-input {
    margin-top: 0.25rem;
    margin-left: -1.5rem;
}

.form-check-label {
    line-height: 1.5;
}

/* Form section dividers */
.form-divider {
    border-top: 1px solid #e0e0e0;
    margin: 1.5rem 0;
}

/* Custom alerts */
.alert-info-light {
    background-color: #e8f4f8;
    border-color: #d1ecf1;
    color: #0c5460;
}

/* RTL fixes for form elements */
html[lang="ar"] .form-check-input {
    margin-right: -1.5rem;
    margin-left: 0;
}

html[lang="ar"] .form-check {
    padding-right: 1.5rem;
    padding-left: 0;
}

/* Form card styling */
.form-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 1.5rem;
}

.form-card .card-header {
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    font-weight: 600;
}

.form-card .card-body {
    padding: 20px;
}

/* Required field indicator */
.required-field::after {
    content: "*";
    color: #dc3545;
    margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .form-group {
        margin-bottom: 1rem;
    }

    .form-card .card-body {
        padding: 15px;
    }

    .image-preview-container img {
        max-width: 100%;
    }
}
