/* Card Component */
.card {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: var(--box-shadow-md);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    text-decoration: none;
    min-height: 44px; /* Touch-friendly minimum height */
    touch-action: manipulation; /* Prevents zoom on double-tap */
}

/* Mobile-friendly button sizing */
@media (max-width: 768px) {
    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .btn i {
        font-size: 1.125rem;
    }
    
    /* Small compact button for mobile summary */
    .btn-compact {
        width: auto !important;
        padding: 15px !important;
        font-size: 0.75rem !important;
        min-height: auto !important;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.875rem;
        font-size: 0.9375rem;
    }
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

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

.btn-accent:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background-color: #0d9668;
    transform: translateY(-2px);
}

.btn-outline-primary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.btn-outline-secondary {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

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

.btn-outline-white {
    background-color: transparent;
    border: 2px solid var(--text-white);
    color: var(--text-white);
}

.btn-outline-white:hover {
    background: #fff;
    color: rgba(22, 73, 50, 1);
}

/* Guest Counter */
.guest-counter {
    display: flex;
    align-items: stretch;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-white);
    max-width: 200px;
}

.guest-counter-btn {
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 50px;
    font-size: 16px;
}

.guest-counter-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
}

.guest-counter-btn:active {
    transform: scale(0.95);
}

.guest-counter-input {
    border: none;
    padding: 0.75rem 1rem;
    text-align: center;
    width: 80px;
    font-weight: bold;
    color: var(--text-dark);
    background: var(--bg-white);
    font-size: 16px;
    height: 50px;
    box-sizing: border-box;
}

.guest-counter-input:focus {
    outline: none;
    background: var(--primary-light);
}

/* Custom Checkboxes */
.checkbox-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 60px;
}

.custom-checkbox:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.75rem;
    font-size: 12px;
    transition: var(--transition);
}

.custom-checkbox label {
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.custom-checkbox.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.custom-checkbox.selected .checkbox-icon {
    background-color: var(--primary-color);
    color: white;
}

.custom-checkbox.food.selected .checkbox-icon {
    background-color: var(--secondary-color);
    color: white;
}

.custom-checkbox.drink.selected .checkbox-icon {
    background-color: var(--primary-color);
    color: white;
}

.custom-checkbox.service.selected .checkbox-icon {
    background-color: var(--accent-color);
    color: white;
}

/* Checkbox Items for Blade Templates */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 60px;
    margin-bottom: 0.5rem;
    touch-action: manipulation; /* Prevents zoom on double-tap */
}

/* Mobile responsive checkboxes */
@media (max-width: 768px) {
    .checkbox-item {
        padding: 1.25rem;
        margin-bottom: 0.75rem;
        min-height: 70px;
    }
    
    .checkbox-label {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .item-name {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .item-price {
        font-size: 0.9375rem;
        font-weight: 700;
    }
}

@media (max-width: 480px) {
    .checkbox-item {
        padding: 1rem;
        min-height: 65px;
        margin-bottom: 0.5rem;
    }
    
    .checkbox-label {
        font-size: 0.9375rem;
    }
    
    .item-name {
        font-size: 0.9375rem;
    }
    
    .item-price {
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    .checkbox-item {
        padding: 0.875rem;
        min-height: 60px;
    }
    
    .checkbox-label {
        font-size: 0.875rem;
    }
    
    .item-name {
        font-size: 0.875rem;
    }
    
    .item-price {
        font-size: 0.8125rem;
    }
}

/* Food Items */
.checkbox-item.food-item:hover {
    border-color: var(--secondary-color);
}

.checkbox-item.food-item.selected {
    border-color: var(--secondary-color);
    background-color: var(--secondary-light);
}

/* Drink Items */
.checkbox-item.drink-item:hover {
    border-color: var(--primary-color);
}

.checkbox-item.drink-item.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

/* Service Items */
.checkbox-item.service-item:hover {
    border-color: var(--accent-color);
}

.checkbox-item.service-item.selected {
    border-color: var(--accent-color);
    background-color: var(--accent-light);
}

.checkbox-item input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

/* Checkbox styling for different categories */
.checkbox-item.food-item input[type="checkbox"] {
    accent-color: var(--secondary-color);
}

.checkbox-item.drink-item input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.checkbox-item.service-item input[type="checkbox"] {
    accent-color: var(--accent-color);
}

/* Base Service Styles */
.checkbox-item.base-service {
    border-color: #fbbf24;
    background-color: #fef3c7;
    opacity: 0.9;
}

.checkbox-item.base-service .checkbox-label {
    position: relative;
    padding-left: 60px;
}

.checkbox-item.base-service .base-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f59e0b;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.checkbox-item.base-service input[type="checkbox"] {
    accent-color: #f59e0b;
    cursor: not-allowed;
}

.checkbox-item.base-service .item-price {
    color: #d97706;
    font-weight: bold;
}

.checkbox-item .checkbox-label {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

.checkbox-item .item-name {
    font-weight: 600;
}

.checkbox-item .item-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Category Headers */
.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.category-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.75rem;
    font-size: 1.25rem;
}

.food-icon {
    background-color: var(--secondary-light);
    color: var(--secondary-color);
}

.drink-icon {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.service-icon {
    background-color: var(--accent-light);
    color: var(--accent-color);
}

/* Summary Balloon */
.summary-balloon {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 350px;
    z-index: 100;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    padding: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.summary-balloon:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 30px -5px rgba(0, 0, 0, 0.2), 0 15px 15px -5px rgba(0, 0, 0, 0.1);
}

.summary-header {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-toggle-btn {
    background: none;
    border: none;
    color: var(--text-white);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
    opacity: 0.8;
}

.summary-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.summary-toggle-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease-in-out;
}

.summary-balloon h3 {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 1.25rem;
}

.summary-balloon h3 i {
    background-color: var(--secondary-color);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 0.75rem;
}

.summary-content {
    padding: 1rem;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s ease-in-out;
    opacity: 1;
}

.summary-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.summary-item i {
    margin-left: 0.5rem;
    width: 16px;
    color: var(--secondary-color);
}

.summary-item-label {
    display: flex;
    align-items: center;
}

.summary-total {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-footer {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-btn {
    width: 100%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.summary-btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    transition: var(--transition);
    border: 2px solid transparent;
}

.step-title {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
    transition: var(--transition);
}

.step.active .step-number {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.step.active .step-title {
    color: var(--primary-color);
    font-weight: bold;
}

.step.completed .step-number {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.step.completed .step-title {
    color: var(--primary-color);
}

.step-line {
    position: absolute;
    top: 1.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 0;
}

.step-line-progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
}

/* Tables */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-modern thead {
    background-color: var(--primary-light);
}

.table-modern th {
    font-weight: bold;
    text-align: right;
    padding: 1rem;
    border-bottom: 2px solid #e2e8f0;
    color: var(--primary-color);
}

.table-modern td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.table-modern tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background-color: var(--primary-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: bold;
}

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

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

.badge-accent {
    background-color: var(--accent-color);
    color: var(--text-white);
}

/* Invoice */
.invoice-header {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 2rem;
    color: var(--text-white);
}

.invoice-body {
    padding: 2rem;
}

.invoice-footer {
    background-color: var(--primary-light);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    padding: 1.5rem 2rem;
}

.invoice-info-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.invoice-total-card {
    background-color: var(--primary-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

/* Admin Panel */
.admin-section {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.admin-section-header {
    background-color: var(--primary-light);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.admin-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-dark);
}

.admin-section-body {
    padding: 1.5rem;
}

.action-btn {
    padding: 0.5rem;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn-danger {
    background-color: #fee2e2;
    color: var(--danger-color);
}

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

/* Stat Cards */
.stat-card {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

/* Alert Components */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    position: relative;
    animation: slideInDown 0.3s ease-out;
}

.alert-success {
    background-color: #f0f9ff;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-success .alert-icon {
    color: var(--success-color);
}

.alert-danger {
    background-color: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-danger .alert-icon {
    color: var(--danger-color);
}

.alert-info {
    background-color: #eff6ff;
    border-color: var(--primary-color);
    color: #1e40af;
}

.alert-info .alert-icon {
    color: var(--primary-color);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-message {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: var(--transition);
    padding: 0;
    margin-right: 0.5rem;
}

.alert-close:hover {
    opacity: 1;
}

.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

/* Mobile responsive alert positioning */
@media (max-width: 768px) {
    .alert-container {
        top: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 400px;
        width: calc(100% - 40px);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.alert.fade-out {
    animation: slideOutUp 0.3s ease-in forwards;
}

/* Input field with date picker icon */
input[id="eventDate"] {
    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='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 20px;
    padding-left: 45px;
    cursor: pointer;
}

/* RTL adjustment for date picker input */
[dir="rtl"] input[id="eventDate"] {
    background-position: right 12px center;
    padding-right: 45px;
    padding-left: 12px;
}

/* Print-specific styles */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    /* Print page settings */
    @page {
        margin: 1cm;
        size: A4;
    }
    
    /* Print header styling */
    .print-invoice-header {
        page-break-inside: avoid;
        margin-bottom: 1cm;
    }
    
    /* Print footer styling */
    .print-invoice-footer {
        page-break-inside: avoid;
        margin-top: 1cm;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    /* Ensure content fits on page */
    .invoice-section {
        page-break-inside: avoid;
    }
    
    /* Hide unnecessary elements during print */
    header,
    .step-indicator,
    .step-line,
    .btn,
    button,
    #registrationForm,
    #orderCalculator,
    #mobileSummaryBar,
    #desktopSummaryBalloon,
    .mobile-summary-bar,
    .desktop-summary-balloon {
        display: none !important;
    }
}
