/* TableReady UI Standardization */
:root {
    --primary-color: #28a745;
    --secondary-color: #ff7f00;
    --accent-color: #ffcc00;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --sidebar-bg: #1F1C1C;
    --sidebar-text: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --dark-bg: #0a1a1a;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
}

/* Standard buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
    transition: all var(--transition-speed) ease;
}

.btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 2px 5px rgba(255, 127, 0, 0.2);
    transition: all var(--transition-speed) ease;
}

.btn-secondary:hover {
    background-color: #e67300;
    border-color: #cc6600;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 127, 0, 0.3);
}

.btn-success {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.2);
    transition: all var(--transition-speed) ease;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Standard cards */
.card {
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    border: none;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Dark theme cards for waitlist */
.bg-dark .card {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-dark .card-header {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Apple-style form elements */
.form-control, .btn, .form-select {
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
}

.form-control, .form-select {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
    border-color: var(--primary-color);
    outline: none;
}

/* TableReady branding */
.navbar-brand span.table {
    color: #28a745;
}

.navbar-brand span.ready {
    background: linear-gradient(to right, #ff7f00, #ffcc00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Waitlist status badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

.badge.bg-success {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.badge.bg-warning {
    background-color: var(--accent-color) !important;
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 204, 0, 0.2);
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* Subtle animations */
.nav-link, .btn, .dropdown-item {
    transition: all var(--transition-speed) ease;
}

.nav-link:hover, .dropdown-item:hover {
    transform: translateX(2px);
}

/* Table styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    font-weight: 600;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(40, 167, 69, 0.05);
}

/* Sidebar refinements */
.sidebar .nav-link {
    border-radius: 8px;
    margin: 0.25rem 0.75rem;
    transition: all var(--transition-speed) ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

/* Mobile optimizations */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
    }
    
    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--card-shadow);
    }
    
    .settings-tabs-wrapper {
        width: 100%;
        overflow: visible;
        margin-bottom: 1rem;
    }
    
    .settings-tabs-horizontal {
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem;
        scroll-snap-type: x proximity;
        position: relative;
    }
    
    .settings-tab-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
        flex-shrink: 0;
        white-space: nowrap;
        scroll-snap-align: start;
    }
    
    .settings-tab-item i {
        font-size: 1.3rem;
        margin-bottom: 0.25rem;
    }
    
    /* Ensure the last item has padding on mobile */
    .settings-tabs-horizontal::after {
        content: "";
        flex: 0 0 0.5rem;
        display: inline-block;
    }
}

/* Settings Tabs Horizontal Layout - Icon-based Style */
.settings-tabs-wrapper {
    width: 100%;
    position: relative;
    overflow: visible;
    margin-bottom: 1.5rem;
}

.settings-tabs-horizontal {
    background-color: #1A8754;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem;
    width: 100%;
    border-radius: 0;
}

.settings-tabs-horizontal::-webkit-scrollbar {
    display: none;
}

.settings-tab-item {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    font-size: 0.75rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    white-space: nowrap;
}

.settings-tab-item:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.settings-tab-item.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    position: relative;
    font-weight: 600;
}

.settings-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 25%;
    right: 25%;
    height: 2px;
    background-color: white;
    border-radius: 1px;
}

.settings-tab-item i {
    display: block;
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.9);
}

.settings-tab-item:hover i {
    color: white;
}

.settings-tab-item.active i {
    color: white;
}

/* Waitlist public interface */
.waitlist-form {
    background-color: var(--dark-bg);
    color: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.waitlist-form .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.waitlist-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.waitlist-form .form-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(40, 167, 69, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
