/* Travel Booking Pro - Frontend Styles */

/* CSS Variables for Customization */
:root {
    --tbp-primary-color: #007cba;
    --tbp-button-color: #007cba;
    --tbp-text-color: #333333;
    --tbp-border-color: #ddd;
    --tbp-background-color: #858383;
    --tbp-hover-color: #005a87;
    --tbp-success-color: #28a745;
    --tbp-error-color: #dc3545;
    --tbp-warning-color: #ffc107;
    --tbp-border-radius: 8px;
    --tbp-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --tbp-transition: all 0.3s ease;
}

/* Main Container */
.tbp-booking-form-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--tbp-background-color);
    border-radius: var(--tbp-border-radius);
    box-shadow: var(--tbp-box-shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tbp-form-title {
    text-align: center;
    color: var(--tbp-primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
}

/* Form Layout */
.tbp-booking-form {
    width: 100%;
}

.tbp-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.tbp-form-group {
    display: flex;
    flex-direction: column;
}

.tbp-field-label {
    font-weight: 600;
    color: var(--tbp-text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.tbp-required {
    color: var(--tbp-error-color);
    margin-left: 2px;
}

/* Form Controls */
.tbp-form-control {
    padding: 12px 16px;
    border: 2px solid var(--tbp-border-color);
    border-radius: var(--tbp-border-radius);
    font-size: 1rem;
    transition: var(--tbp-transition);
    background: #f84848;
    color: var(--tbp-text-color);
}

.tbp-form-control:focus {
    outline: none;
    border-color: var(--tbp-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tbp-form-control:hover {
    border-color: var(--tbp-primary-color);
}

/* Select Dropdown */
select.tbp-form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Textarea */
textarea.tbp-form-control {
    resize: vertical;
    min-height: 100px;
}

/* Number Input */
input[type="number"].tbp-form-control {
    -moz-appearance: textfield;
}

input[type="number"].tbp-form-control::-webkit-outer-spin-button,
input[type="number"].tbp-form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date Input */
input[type="date"].tbp-form-control {
    position: relative;
}

/* Submit Button */
.tbp-form-actions {
    text-align: center;
    margin-top: 2rem;
}

.tbp-submit-btn {
    background: linear-gradient(135deg, var(--tbp-button-color), var(--tbp-hover-color));
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--tbp-border-radius);
    cursor: pointer;
    transition: var(--tbp-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
}

.tbp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.tbp-submit-btn:active {
    transform: translateY(0);
}

.tbp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.tbp-spinner {
    animation: tbp-spin 1s linear infinite;
}

@keyframes tbp-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tbp-spinner .path {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: tbp-dash 1.5s ease-in-out infinite;
}

@keyframes tbp-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Messages */
#tbp-form-messages {
    margin-top: 1rem;
}

.tbp-message {
    padding: 12px 16px;
    border-radius: var(--tbp-border-radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.tbp-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tbp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Booking List Styles */
.tbp-booking-list {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.tbp-bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tbp-booking-card {
    background: white;
    border-radius: var(--tbp-border-radius);
    box-shadow: var(--tbp-box-shadow);
    padding: 1.5rem;
    transition: var(--tbp-transition);
    border-left: 4px solid var(--tbp-primary-color);
}

.tbp-booking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tbp-booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.tbp-booking-header h4 {
    margin: 0;
    color: var(--tbp-primary-color);
    font-size: 1.25rem;
}

.tbp-booking-id {
    background: var(--tbp-primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tbp-booking-details {
    margin-bottom: 1rem;
}

.tbp-detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.tbp-label {
    font-weight: 600;
    color: #666;
}

.tbp-value {
    color: var(--tbp-text-color);
}

.tbp-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tbp-status-pending {
    background: #fff3cd;
    color: #856404;
}

.tbp-status-confirmed {
    background: #d4edda;
    color: #155724;
}

.tbp-status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.tbp-special-requests {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.tbp-special-requests h5 {
    margin: 0 0 0.5rem 0;
    color: var(--tbp-text-color);
    font-size: 0.9rem;
}

.tbp-special-requests p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tbp-no-bookings {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: var(--tbp-border-radius);
}

/* Search Form Styles */
.tbp-search-form {
    background: white;
    padding: 2rem;
    border-radius: var(--tbp-border-radius);
    box-shadow: var(--tbp-box-shadow);
    margin: 2rem auto;
    max-width: 1200px;
}

.tbp-search-horizontal .tbp-search-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.tbp-search-field {
    position: relative;
}

.tbp-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--tbp-border-color);
    border-radius: var(--tbp-border-radius);
    font-size: 1rem;
    transition: var(--tbp-transition);
}

.tbp-destination-field {
    position: relative;
}

.tbp-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    pointer-events: none;
}

.tbp-destination-field .tbp-search-input {
    padding-left: 40px;
}

.tbp-search-btn {
    background: var(--tbp-button-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--tbp-border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--tbp-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbp-search-btn:hover {
    background: var(--tbp-hover-color);
}

.tbp-search-filters {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.tbp-filter-group {
    margin-bottom: 1rem;
}

.tbp-filter-group label {
    font-weight: 600;
    color: var(--tbp-text-color);
    margin-bottom: 0.5rem;
    display: block;
}

.tbp-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tbp-filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.tbp-filter-option input {
    margin: 0;
}

.tbp-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--tbp-border-color);
    border-radius: var(--tbp-border-radius);
    font-size: 0.9rem;
}

/* Screen Reader Only */
.tbp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tbp-booking-form-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .tbp-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tbp-search-horizontal .tbp-search-fields {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tbp-bookings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tbp-booking-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .tbp-detail-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .tbp-filter-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tbp-form-title {
        font-size: 1.5rem;
    }

    .tbp-submit-btn {
        width: 100%;
        padding: 14px;
    }

    .tbp-booking-list {
        padding: 1rem;
    }
}

/* Theme Variations */
.tbp-theme-modern {
    --tbp-border-radius: 12px;
    --tbp-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.tbp-theme-modern .tbp-form-control {
    border-width: 1px;
    background: #f8f9fa;
}

.tbp-theme-modern .tbp-form-control:focus {
    background: white;
}

.tbp-theme-minimal {
    --tbp-border-radius: 4px;
    --tbp-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tbp-theme-minimal .tbp-booking-form-container {
    box-shadow: none;
    border: 1px solid var(--tbp-border-color);
}

/* Print Styles */
@media print {

    .tbp-submit-btn,
    .tbp-search-btn {
        display: none;
    }

    .tbp-booking-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}