/* Custom styles for UK Public Sector Organisations website */

/* Alpine.js cloak - hide elements until Alpine is loaded */
[x-cloak] {
    display: none !important;
}

/* Loading spinner animation (already defined via Tailwind but kept for reference) */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom scrollbar for results list */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Status badges */
.status-active {
    @apply bg-green-100 text-green-800 px-2 py-1 rounded text-xs font-medium;
}

.status-inactive {
    @apply bg-orange-100 text-orange-800 px-2 py-1 rounded text-xs font-medium;
}

.status-dissolved {
    @apply bg-red-100 text-red-800 px-2 py-1 rounded text-xs font-medium;
}

.status-closed {
    @apply bg-gray-100 text-gray-800 px-2 py-1 rounded text-xs font-medium;
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }

    .print-break {
        page-break-after: always;
    }

    body {
        font-size: 12pt;
    }
}

/* Responsive table styles for additional properties */
.properties-table {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 2fr;
    gap: 0.5rem;
}

/* Status badge styles */
.status-active {
    @apply text-green-700 bg-green-100 px-2 py-0.5 rounded text-xs;
}

.status-inactive {
    @apply text-yellow-700 bg-yellow-100 px-2 py-0.5 rounded text-xs;
}

.status-dissolved {
    @apply text-red-700 bg-red-100 px-2 py-0.5 rounded text-xs;
}

/* Organisation card hover effect */
.org-card {
    transition: background-color 0.2s ease;
}

.org-card:hover {
    background-color: #f9fafb;
}

/* Modal backdrop animation */
.modal-backdrop {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Chart container responsive sizing */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Loading skeleton animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .properties-table {
        grid-template-columns: 1fr;
    }
}

/* Download button pulse animation */
.download-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}