/* Red Cross Philippines - Custom Styles */

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
}

/* Custom component styles */
.btn-primary {
    @apply bg-red-cross-blue text-white px-6 py-3 rounded-lg font-semibold hover:bg-red-cross-secondary-blue transition-all duration-300 transform hover:-translate-y-1 hover:shadow-lg;
}

/* Form Grid Layout (Strict Two-Column) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal-width columns */
    gap: 20px 30px; /* Vertical and horizontal spacing */
    margin-bottom: 20px;
}

/* Full-width Field (For Address and Occupation) */
.full-width {
    grid-column: 1 / -1; /* Spans across both columns */
}

/* Field Styling (Top-Aligned Labels) */
.field-group {
    display: flex;
    flex-direction: column; /* Stacks label above input */
}

.field-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
    font-size: 0.95em;
}

/* Input/Select/Textarea Styling (Full-Width, Rounded, Colored Border) */
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #f5f7f6; /* UPDATED: New border color */
    border-radius: 8px; /* Rounded corners */
    box-sizing: border-box; /* Includes padding and border in the element's total width and height */
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: #007bff; /* Darker blue on focus (kept for user feedback) */
    outline: none;
}

/* Placeholder and option styling for uniform color */
.form-input::placeholder {
    color: #9da2ae !important;
}

.form-input option:disabled {
    color: #9da2ae !important;
}

.form-input option {
    color: #333;
}

/* Specific styling for select dropdowns */
select.form-input {
    color: #9da2ae;
}

select.form-input:focus,
select.form-input:valid {
    color: #333;
}

/* Date input styling */
input[type="date"].form-input {
    color: #9da2ae;
}

input[type="date"].form-input::-webkit-datetime-edit-text,
input[type="date"].form-input::-webkit-datetime-edit-month-field,
input[type="date"].form-input::-webkit-datetime-edit-day-field,
input[type="date"].form-input::-webkit-datetime-edit-year-field {
    color: #9da2ae;
}

/* When date has value, make it black */
input[type="date"].form-input:valid {
    color: #000000 !important;
}

input[type="date"].form-input:valid::-webkit-datetime-edit-text,
input[type="date"].form-input:valid::-webkit-datetime-edit-month-field,
input[type="date"].form-input:valid::-webkit-datetime-edit-day-field,
input[type="date"].form-input:valid::-webkit-datetime-edit-year-field {
    color: #000000 !important;
}

/* Specific styling for the Address textarea */
.field-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Styling for the date input and icon (to mimic the visual) */
.date-input-group {
    display: flex;
    align-items: center;
}
.date-input-group input {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex-grow: 1;
}
.date-icon {
    padding: 10px 12px;
    border: 2px solid #f5f7f6; /* UPDATED: New border color */
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #f8f8f8;
    color: #555; /* Changed icon color to a darker grey for visibility */
}

/* Section Header Styling */
.section-header {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-top: 25px;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 5px solid #cc0000; /* Red line on the left */
}

/* Required Field Styling (Red Asterisk) */
.required::after {
    content: ' *';
    color: #cc0000; /* Bright red color for the asterisk */
    font-weight: bold;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-label .required-asterisk {
    @apply text-red-500;
}

.form-error {
    @apply text-gray-600 text-xs mt-1;
}

.card {
    @apply bg-white rounded-xl shadow-lg p-6;
}

.hero-gradient {
    @apply bg-gradient-to-br from-red-cross-light-blue to-white;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading spinner */
.spinner {
    @apply inline-block w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin;
}

/* Mobile menu styles */
.mobile-menu {
    @apply md:hidden absolute top-16 left-0 right-0 bg-white shadow-lg border-t;
}

.mobile-menu.hidden {
    @apply hidden;
}

/* Form validation styles */
.form-input.error {
    @apply border-red-500 focus:border-red-500 focus:ring-red-500/20;
}

.form-input.success {
    @apply border-green-500 focus:border-green-500 focus:ring-green-500/20;
}

/* Payment method selection */
.payment-method {
    @apply p-4 border-2 border-gray-300 rounded-lg text-center transition-all duration-200 cursor-pointer hover:border-gray-400;
}

.payment-method.selected {
    @apply border-red-cross-blue bg-red-cross-light-blue;
}

/* QR Scanner modal */
.modal {
    @apply fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center;
}

.modal.hidden {
    @apply hidden;
}

/* Success/Error messages */
.alert {
    @apply p-4 rounded-lg border flex items-center;
}

.alert-success {
    @apply bg-green-100 border-green-400 text-green-700;
}

.alert-error {
    @apply bg-red-100 border-red-400 text-red-700;
}

.alert-info {
    @apply bg-blue-100 border-blue-400 text-blue-700;
}

/* Step indicator */
.step-indicator {
    @apply flex items-center space-x-8;
}

.step {
    @apply flex items-center space-x-3;
}

.step-number {
    @apply w-10 h-10 rounded-full flex items-center justify-center font-semibold;
}

.step-number.active {
    @apply bg-red-cross-blue text-white;
}

.step-number.completed {
    @apply bg-green-500 text-white;
}

.step-number.inactive {
    @apply bg-gray-300 text-gray-600;
}

.step-line {
    @apply w-16 h-0.5;
}

.step-line.active {
    @apply bg-red-cross-blue;
}

.step-line.completed {
    @apply bg-green-500;
}

.step-line.inactive {
    @apply bg-gray-300;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        @apply hidden;
    }
    
    .mobile-full {
        @apply w-full;
    }
}

/* Print styles */
@media print {
    .no-print {
        @apply hidden;
    }
    
    .print-break {
        page-break-after: always;
    }
}

/* Accessibility improvements */
.sr-only {
    @apply absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0;
}

.focus-visible {
    @apply focus:outline-none focus:ring-2 focus:ring-red-cross-blue focus:ring-offset-2;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        @apply border-2 border-red-cross-blue;
    }
    
    .form-input {
        @apply border-2;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
