/* Hide the default radio input */
.radio-group input[type="radio"] {
    display: none;
}

/* Style the labels to look like custom radio buttons */
.radio-group label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid black;
    border-radius: 50%;
    cursor: pointer;
    background-color: white;
    margin: 0 auto;
    /* Mobile touch improvements */
    min-width: 32px;
    min-height: 32px;
    touch-action: manipulation;
}

/* Mobile: Larger touch targets for radio buttons */
@media (max-width: 768px) {
    .radio-group label {
        width: 32px;
        height: 32px;
        min-width: 36px;
        min-height: 36px;
    }
}

/* When radio is checked, fill the label */
.radio-group input[type="radio"]:checked + label {
    background-color: black;
}

/* Greyed out (NS disabled state) */
.radio-group input[type="radio"]:disabled + label {
    border-color: gray;
    background-color: lightgray;
    cursor: not-allowed;
}

/* For even rows (alternating background colors) */
.even-row {
    background-color: #f7fafc;
}

.table-fixed {
    table-layout: fixed;
    width: 100%;
}

.table-fixed th, .table-fixed td {
    text-align: center;
}

.table-fixed th:first-child,
.table-fixed td:first-child {
    width: 150px; /* Set a fixed width for the day column */
}

/* Mobile responsive table improvements */
@media (max-width: 768px) {
    .table-fixed {
        font-size: 0.875rem;
    }
    
    .table-fixed th:first-child,
    .table-fixed td:first-child {
        width: 80px;
        min-width: 80px;
    }
    
    .table-fixed th,
    .table-fixed td {
        padding: 0.5rem 0.25rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .table-fixed {
        font-size: 0.75rem;
    }
    
    .table-fixed th:first-child,
    .table-fixed td:first-child {
        width: 60px;
        min-width: 60px;
    }
    
    .table-fixed th,
    .table-fixed td {
        padding: 0.25rem 0.125rem;
    }
}

.hidden {
    display: none;
}

/* Button Styles for Submit */
.submit-button {
    color: white;
    font-medium: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    /* Mobile improvements */
    min-height: 44px;
    touch-action: manipulation;
    transition: all 0.2s ease-in-out;
}

/* Mobile: Larger submit button */
@media (max-width: 768px) {
    .submit-button {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
        min-height: 48px;
        width: 100%;
        max-width: 300px;
    }
}

.submit-button.bg-indigo-600:hover {
    background-color: #4338ca !important;
}

.submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.submit-button.bg-gray-400 {
    background-color: #9ca3af !important;
    cursor: not-allowed;
}

/* Loader styles */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading dots animation */
.loading-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    background-color: #3b82f6;
    border-radius: 50%;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots div:nth-child(1) { animation-delay: -0.32s; }
.loading-dots div:nth-child(2) { animation-delay: -0.16s; }
.loading-dots div:nth-child(3) { animation-delay: 0s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    /* Main container adjustments */
    #main-form-container {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 0.5rem;
    }
    
    /* Title adjustments */
    #season-title {
        font-size: 1.75rem;
        line-height: 2rem;
    }
    
    /* Form field improvements */
    input[type="text"], 
    input[type="email"], 
    select, 
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        min-height: 44px;
    }
    
    /* Employee search improvements */
    #employee-suggestions {
        max-height: 200px;
        font-size: 16px;
    }
    
    #employee-suggestions li {
        padding: 0.75rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Checkbox improvements */
    #understand-checkbox {
        min-width: 20px;
        min-height: 20px;
    }
    
    /* Copy to all weeks button */
    .copy-to-all-button {
        width: 100%;
        max-width: none;
        margin-bottom: 1rem;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Week table improvements */
    .bg-white.p-8.rounded-lg.shadow-md {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Confirmation message */
    .pattern-applied-message {
        padding: 0.75rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    #main-form-container {
        padding: 0.75rem;
        margin: 0.25rem;
    }
    
    #season-title {
        font-size: 1.5rem;
        line-height: 1.75rem;
    }
    
    /* Even smaller text for very small screens */
    .table-fixed {
        font-size: 0.7rem;
    }
    
    /* Compact form fields */
    input[type="text"], 
    input[type="email"], 
    select, 
    textarea {
        padding: 0.5rem;
        min-height: 40px;
    }
}

/* Landscape orientation improvements */
@media (max-width: 768px) and (orientation: landscape) {
    #main-form-container {
        padding: 0.5rem;
    }
    
    .table-fixed {
        font-size: 0.8rem;
    }
    
    .table-fixed th,
    .table-fixed td {
        padding: 0.25rem 0.125rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for touch devices */
    .radio-group label {
        width: 36px;
        height: 36px;
    }
    
    /* Better button spacing */
    button, 
    input[type="submit"], 
    input[type="button"] {
        min-height: 44px;
        margin: 0.25rem 0;
    }
    
    /* Better form field spacing */
    .mb-4 {
        margin-bottom: 1rem;
    }
}

