/* Custom CSS Styles */

/* RTL Support */
[dir="rtl"] .ml-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .mr-2 {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Arabic Font Adjustments */
[dir="rtl"] body {
    font-family: 'Tajawal', sans-serif;
    letter-spacing: 0;
}

/* Custom File Input */
.custom-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.file-label {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.file-label:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.file-label.file-selected {
    border-color: #16a34a;
    background-color: #f0fdf4;
}

.file-icon {
    margin-right: 0.5rem;
}

[dir="rtl"] .file-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Custom Radio Buttons */
.custom-radio {
    display: flex;
    align-items: center;
}

.custom-radio input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    margin-right: 0.5rem;
    transition: all 0.2s ease-in-out;
}

[dir="rtl"] .radio-label {
    margin-right: 0;
    margin-left: 0.5rem;
}

.radio-label:hover {
    background-color: #f3f4f6;
}

.custom-radio input[type="radio"]:checked + .radio-label {
    border-color: #16a34a;
    background-color: #f0fdf4;
    color: #16a34a;
}

/* Custom Select */
.custom-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

[dir="rtl"] .custom-select {
    background-position: left 0.75rem center;
    padding-right: 0.75rem;
    padding-left: 2.5rem;
}

/* Animation Styles */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background-color: rgba(22, 101, 52, 0.05);
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    z-index: -1;
}

[dir="rtl"] .hero-image {
    right: auto;
    left: 0;
}

/* Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-reviewing {
    background-color: #e0f2fe;
    color: #0369a1;
}

.status-approved {
    background-color: #dcfce7;
    color: #15803d;
}

.status-rejected {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Step Cards */
.step-card {
    position: relative;
}

.step-card::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background-color: #16a34a;
    z-index: -1;
}

[dir="rtl"] .step-card::after {
    right: auto;
    left: -1rem;
}

.step-card:last-child::after {
    display: none;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background-color: #16a34a;
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Form Styles */
.form-section {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #16a34a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dcfce7;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .step-card::after {
        display: none;
    }
    
    .hero-image {
        width: 100%;
        opacity: 0.1;
    }
}

/* Tom Select Customization */
.ts-wrapper {
    width: 100%;
}

.ts-control {
    border-radius: 0.5rem;
    border-color: #d1d5db;
    padding: 0.5rem 1rem;
    min-height: 42px;
    font-size: 1rem;
    background-color: #fff;
}

/* Remove Tom Select nationality styles */
/* .tom-select-nationality + .ts-wrapper .ts-control {
    border-radius: 0.5rem;
    border-color: #E5E7EB;
    padding: 0.5rem 1rem;
    min-height: 42px;
    font-size: 1rem;
    line-height: 1.5;
}

.tom-select-nationality {
    display: none;
}

.tom-select-nationality + .ts-wrapper {
    margin-top: 0;
}

.tom-select-nationality + .ts-wrapper.focus .ts-control {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
    border-color: #6366F1;
}

.tom-select-nationality + .ts-wrapper .ts-control .item {
    background: none;
    color: inherit;
    border-radius: 0;
    padding: 0;
} */

/* Style for nationality field selected item */
.tom-select-nationality + .ts-wrapper .ts-control .item {
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
    color: #000;
    font-size: 1rem;
}

.ts-dropdown {
    border-radius: 0.5rem;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 4px;
}

.ts-dropdown .option {
    padding: 0.5rem 1rem;
}

.ts-dropdown .active {
    background-color: rgba(34, 197, 94, 0.1);
    color: #166534;
}

.ts-dropdown .create {
    color: #22c55e;
}

.ts-wrapper.has-items .ts-control {
    padding: 0.25rem 0.5rem;
}

.ts-wrapper.focus .ts-control {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.ts-wrapper.has-items .ts-control .item {
    background-color: #f0fdf4;
    color: #166534;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    border: 1px solid #dcfce7;
}

/* RTL support for Tom Select */
[dir="rtl"] .ts-control {
    padding-right: 1rem;
    padding-left: 2rem;
}

[dir="rtl"] .ts-control .item {
    margin-right: 0;
    margin-left: 3px;
}

[dir="rtl"] .ts-control .clear-button {
    right: auto;
    left: 8px;
}

/* Error state for Tom Select */
.border-red-500 + .ts-wrapper .ts-control {
    border-color: #ef4444;
}

.border-red-500 + .ts-wrapper.focus .ts-control {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
} 