/*
 * Base Styles - Core accessibility and global styles
 * Loaded on all pages
 */

/* CSS Custom Properties */
:root {
    --color-gray-text: #4b5563; /* Tailwind gray-600 - Standard text gray */
}

/* Accessibility Helper Classes */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    padding: 0 !important;
    border: 0 !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden;
    overflow-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgb(0 0 0 / 60%);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus Styles for Keyboard Navigation */
*:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Button Base Styles */
.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgb(0 115 170 / 20%);
}

.btn-secondary {
    background: transparent;
    color: #0073aa;
    border-color: #0073aa;
}

.btn-secondary:hover {
    background: #0073aa;
    color: white;
}

/* Loading States */
.loading {
    position: relative;
    min-height: 200px;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgb(0 0 0 / 10%);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Error States */
.no-properties,
.error {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    grid-column: 1 / -1;
}

.error {
    color: #dc3545;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentcolor;
    }

    *:focus {
        outline: 3px solid currentcolor;
        outline-offset: 3px;
    }
}

/* Print Styles */
@media print {
    * {
        color: #000 !important;
        background: #fff !important;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
