/* Custom styles not covered by Tailwind CSS */

/* Global styles */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f3f4f6;
    --dark-bg: #1f2937;
    --text-color: #374151;
    --text-light: #6b7280;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Button styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

/* Card styles */
.card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

/* Header and navigation */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.nav-link {
    position: relative;
    transition: var(--transition);
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: white;
    transition: var(--transition);
}

.nav-link:hover:after {
    width: 100%;
}

/* Alert styles */
.alert {
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--secondary-color);
    color: var(--secondary-dark);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    color: #92400e;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    color: #b91c1c;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary-color);
    color: var(--primary-dark);
}

/* New styles for plane list */
.space-y-6 .plane-item {
    width: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    height: 40vh !important; /* Set to 40% of the viewport height */
    min-height: 300px !important; /* Minimum height to ensure visibility on smaller screens */
}

.plane-info-box {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 24rem;
}

@media (max-width: 640px) {
    .space-y-6 .plane-item {
        height: 30vh !important; /* Slightly smaller on mobile devices */
        min-height: 200px !important;
    }

    .plane-info-box {
        right: 1rem;
        max-width: none;
    }
}

/* Booking item styles */
.booking-item {
    position: relative;
    padding-left: 1rem;
    border-left: 0.25rem solid transparent;
    transition: all 0.3s ease;
}

.booking-item.reserved {
    border-left-color: #FBBF24;
    background-color: rgba(251, 191, 36, 0.1);
}

.booking-item.confirmed {
    border-left-color: #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}

.booking-item.reserved:hover {
    background-color: rgba(251, 191, 36, 0.2);
}

.booking-item.confirmed:hover {
    background-color: rgba(16, 185, 129, 0.2);
}

/* Status indicator */
.booking-item::after {
    content: attr(data-status);
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.booking-item.reserved::after {
    background-color: #FBBF24;
    color: #78350F;
}

.booking-item.confirmed::after {
    background-color: #10B981;
    color: #064E3B;
}

/* FullCalendar custom styles */
.fc-event-reserved {
    background-color: #FBBF24 !important;
    border-color: #FBBF24 !important;
}

.fc-event-confirmed {
    background-color: #10B981 !important;
    border-color: #10B981 !important;
}

/* Add opacity for other users' bookings */
.fc-event-reserved:not(.fc-event-own),
.fc-event-confirmed:not(.fc-event-own) {
    opacity: 0.5 !important;
}

.fc-event-reserved.fc-event-own,
.fc-event-confirmed.fc-event-own {
    opacity: 1 !important;
}

/* Enhanced Selection styles */
.fc-highlight {
    background-color: rgba(59, 130, 246, 0.25) !important;
    border: 2px solid rgba(59, 130, 246, 0.5) !important;
}

.fc-selecting {
    background-color: rgba(59, 130, 246, 0.35) !important;
}

/* Selection helper styles */
.fc .fc-highlight-skeleton {
    z-index: 3 !important;
}

.fc-timegrid-col-events {
    margin: 0 1px !important;
}

/* Custom tooltip styles */
.event-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 10000;
    pointer-events: none;
    white-space: pre-line;
    max-width: 200px;
}

/* Responsive styles for FullCalendar */
@media (max-width: 768px) {
    #calendar {
        height: 400px;
    }

    /* Reduce font size for calendar headers */
    .fc .fc-toolbar {
        font-size: 0.9em !important;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2em !important;
    }

    /* Make the day headers more compact */
    .fc .fc-col-header-cell {
        padding: 2px !important;
    }

    .fc .fc-col-header-cell-cushion {
        padding: 2px !important;
        font-size: 0.9em !important;
    }

    /* Adjust the date display in column headers */
    .fc-theme-standard .fc-timeGridWeek-view .fc-col-header-cell {
        font-size: 0.8em !important;
    }

    .fc .fc-timeGridWeek-view .fc-col-header-cell-cushion {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        line-height: 1.2 !important;
        padding: 2px !important;
    }

    /* Make weekday names shorter */
    .fc-theme-standard .fc-timeGridWeek-view .fc-col-header-cell-cushion {
        white-space: normal !important;
    }

    /* Adjust the time slots */
    .fc .fc-timegrid-slot {
        height: 2em !important;
    }

    .fc .fc-timegrid-axis {
        padding: 2px !important;
        font-size: 0.8em !important;
    }
}

/* Even smaller screens */
@media (max-width: 480px) {
    .fc .fc-toolbar {
        font-size: 0.8em !important;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: 0.8em !important;
    }

    /* Further compact the header cells */
    .fc-theme-standard .fc-timeGridWeek-view .fc-col-header-cell {
        font-size: 0.7em !important;
    }

    /* Minimize padding */
    .fc .fc-col-header-cell,
    .fc .fc-timegrid-slot,
    .fc .fc-timegrid-axis {
        padding: 1px !important;
    }
}

/* Ensure form inputs don't zoom on mobile */
@media (max-width: 480px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 16px;
    }
}

/* Phone input styles */
.phone-input-container {
    display: flex;
    align-items: center;
}

.iti {
    width: 100%;
}

.iti__flag-container {
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

.iti__selected-flag {
    padding: 0 6px 0 8px;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 0.375rem 0 0 0.375rem;
}

.iti__country-list {
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#id_phone_number_1 {
    padding-left: 90px !important;
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

/* Hide the country code input */
#id_phone_number_0 {
    display: none;
}

/* Wallet interface styles */
.wallet-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.balance-card {
    flex: 1 1 calc(25% - 1rem);
    min-width: 200px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.balance-card h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.balance-card .amount {
    font-size: 1.5rem;
    font-weight: bold;
}

.balance-card .description {
    font-size: 0.875rem;
    color: #6B7280;
}

@media (max-width: 768px) {
    .balance-card {
        flex: 1 1 calc(50% - 1rem);
    }
}

@media (max-width: 480px) {
    .balance-card {
        flex: 1 1 100%;
    }
}

/* Add Funds section styles */
.add-funds-section {
    margin-top: 2rem;
}
