/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #2980b9;
    --light-gray: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    direction: rtl;
    text-align: right;
}

/* Wrapper */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px 0;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    color: var(--primary-color) !important;
}

.nav-link {
    color: #495057 !important;
}

.nav-link i {
    margin-left: 5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-left: 5px;
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

/* Cards */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card.shadow-sm.rounded-4 {
    padding: 2px;
}

.card-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid #e9ecef;
}

.card-body {
    background-color: white;
    border-radius: 0.5rem;
}

/* Dashboard Styles */
.dashboard-card {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    color: white;
}

.dashboard-card i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.dashboard-card-families {
    background: var(--primary-color);
}

.dashboard-card-children {
    background: var(--secondary-color);
}

.dashboard-card-treatments {
    background: var(--danger-color);
}

/* Tables */
.table-responsive {
    margin-bottom: 20px;
}

.table thead {
    background-color: var(--light-gray);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 15px;
    }
}

/* Footer */
.footer {
    background-color: var(--light-gray);
    border-top: 1px solid #e9ecef;
    padding: 15px 0;
}

/* Forms */
.form-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.form-control.with-icon {
    padding-right: 40px;
    direction: rtl;
    text-align: right;
}

.form-group .icon-container {
    position: absolute;
    right: 10px;
    top: 50%; /* מרכוז אנכי */
    transform: translateY(-50%); /* מרכוז מדויק */
    color: #6c757d;
    z-index: 10;
    pointer-events: none;
}

.form-control-file {
    border: 1px dashed #ced4da;
    padding: 10px;
    border-radius: 0.25rem;
}

.form-check-input {
    margin-left: 10px;
}

/* Submit Button Styling */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Responsive Form Layout */
@media (max-width: 768px) {
    .form-row .col-md-3, 
    .form-row .col-md-6 {
        margin-bottom: 1rem;
    }
    .form-group .icon-container {
        position: static;
        margin-bottom: 5px;
    }
}

/* Dynamic Consent Forms */
.form-control-file[style*="display: none"] {
    display: none !important;
}

/* Therapist Field Styling */
#id_therapist {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    color: #495057;
}

/* Icons */
.section-icon {
    color: var(--primary-color);
    margin-left: 10px;
    font-size: 1.5rem;
}

/* Custom badge colors for gender */
.badge-male {
    background-color: #3498db !important;  /* Soft blue for male */
}

.badge-female {
    background-color: #e91e63 !important;  /* Soft pink for female */
}

.gender-display {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    color: white;
}

.gender-male {
    background-color: #007bff;
}

.gender-female {
    background-color: #e83e8c;
}

/* Remove default search input clear button */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
    }
    50% {
        transform: scale(1.05);
        opacity: 0.7;
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
}

/* כפתורים בסגנון טבלה */
.btn-action {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #212529;
}

.btn-action i {
    margin-left: 5px;
}

.btn-upload {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-upload:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #212529;
}

.btn-upload i {
    margin-left: 5px;
}

/* כפתורי שמירה וביטול */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-primary i, .btn-secondary i {
    margin-left: 5px;
}
