/* Custom styles built on top of Tailwind */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* View transitions */
.view-container {
    transition: opacity 0.3s ease-in-out;
}

/* Glassmorphism utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Table styling for mobile responsiveness */
@media (max-width: 768px) {
    .mobile-table-card {
        display: block;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
        border: 1px solid #e5e7eb;
        background: white;
        padding: 1rem;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }
    
    .mobile-table-card .row {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .mobile-table-card .row:last-child {
        border-bottom: none;
    }
    
    .mobile-table-card .label {
        font-weight: 500;
        color: #6b7280;
        font-size: 0.875rem;
    }
    
    .mobile-table-card .value {
        font-weight: 500;
        color: #111827;
        font-size: 0.875rem;
        text-align: right;
    }
    
    .desktop-table {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-table-card {
        display: none;
    }
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    outline: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Toast animations */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.toast {
    animation: slideInRight 0.3s ease-out forwards;
}

.toast.hiding {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Auto-expanding textarea reset */
textarea.auto-expand {
    resize: none;
    overflow-hidden: hidden; /* Hide scrollbar */
    min-height: 46px; /* Match standard input height with padding */
    line-height: 1.5;
    box-sizing: border-box;
}

/* Responsive Voucher Table adjustments */
@media (max-width: 640px) {
    .voucher-table-responsive th, .voucher-table-responsive td {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
        font-size: 0.65rem !important; /* Smaller text on mobile */
    }
}

