/**
 * Franken UI Frontend Styles
 * Using UIkit 3 + Tailwind CSS Components with Teal Theme
 * Refined to match Classic theme aesthetics
 */

/* Teal Theme Colors */
:root {
    --primary-color: #14b8a6;
    --primary-dark: #0f766e;
    --primary-light: #5eead4;
    --success-color: #32d296;
    --danger-color: #f0506e;
    --warning-color: #faa05a;
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --border-color: #d1d5db;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-focus-border: #14b8a6;
}

/* ====================
   LANGUAGE SWITCHER
==================== */
.iworx-language-switcher {
    display: inline-flex;
    gap: 8px;
    padding: 8px 12px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.iworx-lang-option {
    padding: 6px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    border-radius: 3px;
    transition: all 0.2s;
}

.iworx-lang-option:hover {
    background: #fff;
    color: var(--primary-color);
    text-decoration: none;
}

.iworx-lang-option.active {
    background: var(--primary-color);
    color: #fff;
}

/* ====================
   REFINED TYPOGRAPHY
==================== */
.uk-card-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 16px !important;
}

.uk-h1, .uk-h2, .uk-h3,
h1.uk-card-title, h2.uk-card-title, h3.uk-card-title {
    font-size: 20px !important;
}

.uk-text-large {
    font-size: 16px !important;
}

.uk-text-small {
    font-size: 13px !important;
}

/* ====================
   REFINED BUTTONS
==================== */
.uk-button {
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-transform: none !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border: none !important;
    line-height: 1.5 !important;
}

.uk-button svg {
    width: 16px !important;
    height: 16px !important;
}

.uk-button-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3) !important;
}

.uk-button-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0d5b52 100%) !important;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4) !important;
    transform: translateY(-2px) !important;
}

.uk-button-default {
    background: #6c757d !important;
    color: #ffffff !important;
}

.uk-button-default:hover {
    background: #5a6268 !important;
}

.uk-button-large {
    padding: 14px 32px !important;
    font-size: 16px !important;
}

.uk-button-small {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* ====================
   FRANKEN UI FORM ELEMENTS (Tailwind Style)
==================== */
.uk-input,
.uk-select,
.uk-textarea {
    display: block !important;
    width: 100% !important;
    padding: 0.625rem 0.75rem !important; /* 10px 12px */
    font-size: 0.9375rem !important; /* 15px */
    line-height: 1.5 !important;
    color: var(--text-primary) !important;
    background-color: var(--input-bg) !important;
    background-clip: padding-box !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.5rem !important; /* 8px */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    appearance: none !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.uk-select {
    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 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

.uk-input:focus,
.uk-select:focus,
.uk-textarea:focus {
    border-color: var(--input-focus-border) !important;
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.uk-input::placeholder,
.uk-textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.uk-input:disabled,
.uk-select:disabled,
.uk-textarea:disabled {
    background-color: #f3f4f6 !important;
    border-color: #d1d5db !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.uk-textarea {
    resize: vertical !important;
    min-height: 80px !important;
}

/* Date and Time inputs - Flatpickr styling to match Franken UI */
.flatpickr-input {
    cursor: pointer !important;
}

.flatpickr-calendar {
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid var(--input-border) !important;
}

.flatpickr-day.selected {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.flatpickr-day.selected:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.flatpickr-day:hover {
    background: rgba(20, 184, 166, 0.1) !important;
    border-color: transparent !important;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
    background: rgba(20, 184, 166, 0.05) !important;
}

/* Number input arrows */
.uk-input[type="number"]::-webkit-inner-spin-button,
.uk-input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.6 !important;
}

.uk-input[type="number"]:hover::-webkit-inner-spin-button,
.uk-input[type="number"]:hover::-webkit-outer-spin-button {
    opacity: 1 !important;
}

/* Checkbox and Radio */
.uk-checkbox,
.uk-radio {
    width: 1.125rem !important;
    height: 1.125rem !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 0.25rem !important;
    background-color: var(--input-bg) !important;
    transition: all 0.15s ease-in-out !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.uk-radio {
    border-radius: 50% !important;
}

.uk-checkbox:checked,
.uk-radio:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e") !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.uk-radio:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e") !important;
}

.uk-checkbox:focus,
.uk-radio:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1) !important;
    border-color: var(--primary-color) !important;
}

.uk-form-label {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
    display: inline-block !important;
}

/* ====================
   REFINED CARDS
==================== */
.uk-card {
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.uk-card-default {
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
}

.uk-card-body {
    padding: 24px !important;
}

.uk-card-small .uk-card-body {
    padding: 16px !important;
}

.uk-card-header {
    padding: 20px 24px !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.uk-card-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    color: #ffffff !important;
}

.uk-card-primary .uk-card-title {
    color: #ffffff !important;
}

/* ====================
   LAYOUT & CONTAINERS
==================== */
.uk-container {
    max-width: 1200px !important;
    padding: 0 20px !important;
}

.ix-rent-section {
    margin-bottom: 24px;
}


/* ====================
   REFINED STEP INDICATOR
==================== */
.uk-breadcrumb {
    padding: 20px 0 !important;
    margin-bottom: 24px !important;
}

.uk-breadcrumb > li {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
}

/* Remove UIkit default separator */
.uk-breadcrumb > li::before {
    display: none !important;
    content: none !important;
}

.uk-breadcrumb > :nth-child(n+2):not(.uk-first-column)::before {
    display: none !important;
    content: none !important;
}

.ix-rent-step-number {
    width: 36px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #e5e5e5 !important;
    color: #666 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    margin-bottom: 6px !important;
    transition: all 0.3s ease !important;
}

.uk-breadcrumb > li.uk-active .ix-rent-step-number {
    background: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 8px rgba(20, 184, 166, 0.3) !important;
}

.uk-breadcrumb > li .uk-text-small {
    font-size: 12px !important;
    color: var(--text-secondary) !important;
    white-space: nowrap !important;
}

.uk-breadcrumb > li.uk-active .uk-text-small {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

/* ====================
   VEHICLE CARDS
==================== */
.ix-rent-vehicle-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    cursor: pointer !important;
}

.ix-rent-vehicle-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12) !important;
}

.ix-rent-vehicle-price-box {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    padding: 16px !important;
    border-radius: 8px !important;
    color: white !important;
}

/* ====================
   PAYMENT OPTIONS
==================== */
.ix-rent-payment-option {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
}

.ix-rent-payment-option:hover {
    background-color: #f8f9fa !important;
    border-color: var(--primary-color) !important;
}

.ix-rent-payment-option input[type="radio"]:checked ~ * {
    color: var(--primary-color) !important;
}

.ix-rent-payment-option .uk-text-bold {
    font-size: 15px !important;
}

.ix-rent-payment-option .uk-text-small {
    font-size: 13px !important;
    color: var(--text-secondary) !important;
}

/* ====================
   ALERTS & NOTIFICATIONS
==================== */
.uk-alert {
    border-radius: 8px !important;
    padding: 16px 20px !important;
    font-size: 14px !important;
}

.uk-alert-primary {
    background: rgba(20, 184, 166, 0.1) !important;
    border: 1px solid rgba(20, 184, 166, 0.3) !important;
    border-left: 4px solid var(--primary-color) !important;
    color: var(--text-primary) !important;
}

.uk-alert-warning {
    background: rgba(250, 160, 90, 0.1) !important;
    border: 1px solid rgba(250, 160, 90, 0.3) !important;
    border-left: 4px solid var(--warning-color) !important;
}

/* ====================
   TABLES
==================== */
.uk-table {
    font-size: 14px !important;
}

.uk-table th {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.uk-table td {
    padding: 12px 16px !important;
}

/* ====================
   DESCRIPTION LIST
==================== */
.uk-description-list dt {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 4px !important;
}

.uk-description-list dd {
    font-size: 14px !important;
    color: var(--text-primary) !important;
    margin-bottom: 12px !important;
}

/* ====================
   BOOKING REFERENCE
==================== */
.ix-rent-booking-reference {
    font-family: 'Courier New', monospace !important;
    letter-spacing: 2px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    padding: 12px 20px !important;
    background: rgba(20, 184, 166, 0.1) !important;
    border-radius: 8px !important;
    display: inline-block !important;
}

/* ====================
   SUCCESS ICON
==================== */
.ix-rent-success-icon {
    display: inline-block !important;
    margin: 0 auto 20px !important;
}

.ix-rent-success-icon svg {
    width: 80px !important;
    height: 80px !important;
}

@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.ix-rent-success-icon svg path {
    stroke-dasharray: 100;
    animation: checkmark 0.6s ease-in-out 0.3s forwards;
}

.ix-rent-success-icon svg circle {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ====================
   RESPONSIVE GRID
==================== */
.uk-grid-small {
    margin-left: -12px !important;
}

.uk-grid-small > * {
    padding-left: 12px !important;
}

@media (max-width: 768px) {
    .uk-child-width-1-2\@m > * {
        width: 100% !important;
    }
    
    .uk-flex-between {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .uk-button {
        width: 100% !important;
    }
}

/* ====================
   LOADING STATES
==================== */
.ix-rent-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

/* ====================
   SPACING UTILITIES
==================== */
.uk-margin-small {
    margin-bottom: 12px !important;
}

.uk-margin-small-top {
    margin-top: 12px !important;
}

.uk-margin-medium-bottom {
    margin-bottom: 24px !important;
}

.uk-margin-top {
    margin-top: 20px !important;
}

.uk-margin-bottom {
    margin-bottom: 20px !important;
}

.uk-margin-large {
    margin-top: 40px !important;
    margin-bottom: 40px !important;
}

/* ====================
   TEXT UTILITIES
==================== */
.uk-text-center {
    text-align: center !important;
}

.uk-text-right {
    text-align: right !important;
}

.uk-text-bold {
    font-weight: 600 !important;
}

.uk-text-muted {
    color: var(--text-secondary) !important;
}

.uk-text-success {
    color: var(--success-color) !important;
}

.uk-text-primary {
    color: var(--primary-color) !important;
}

.uk-text-danger {
    color: var(--danger-color) !important;
}

/* Print Styles */
@media print {
    body {
        font-size: 12px;
    }
    
    .uk-button,
    .ix-rent-next-steps,
    header,
    footer,
    nav {
        display: none !important;
    }
    
    .ix-rent-thank-you-wrapper {
        max-width: 100%;
        padding: 0;
    }
    
    .uk-card {
        break-inside: avoid;
    }
    
    .ix-rent-section {
        margin-bottom: 10px;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .uk-table {
        font-size: 11px;
    }
    
    * {
        color: #000 !important;
        background: white !important;
    }
    
    .uk-card,
    .uk-alert {
        border: 1px solid #ddd !important;
    }
}

/* ====================
   UIKIT GRID FIX
==================== */
/* Force UIKit grid to work properly */
[uk-grid] {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

[uk-grid] > * {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.uk-grid-small {
    margin-left: -15px;
}

.uk-grid-small > * {
    padding-left: 15px;
}

/* Ensure width classes work properly */
.uk-width-1-1\@s {
    width: 100%;
}

@media (min-width: 640px) {
    .uk-width-1-2\@m {
        width: 50%;
    }
}

/* Make cards in the same row equal height */
.ix-detail-card,
.ix-price-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.uk-card {
    display: flex;
    flex-direction: column;
    flex: 1;
}
