/* Golf Tournaments Public Styles */

/* Global styles for golf tournament shortcodes */
.golf-tournament-signup,
.golf-leadership-grid,
.golf-member-directory,
.golf-tournaments-list,
.golf-roster-container,
.golf-results-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

/* Common button styles */
.golf-btn,
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 0;
    border: none;
    border-radius: 6px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.golf-btn:hover,
.btn:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.golf-btn:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

.golf-btn:disabled,
.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button variants */
.btn-primary {
    background: #007cba;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Loading states */
.golf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.golf-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: golf-spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Form elements */
.golf-form-group {
    margin-bottom: 16px;
}

.golf-form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #495057;
}

.golf-form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.golf-form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #007cba;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.golf-form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Select2 customizations for golf tournaments */
.select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
    color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 8px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

/* Status indicators */
.status-paid {
    color: #28a745;
}

.status-unpaid {
    color: #dc3545;
}

.status-comp {
    color: #6c757d;
}

/* Membership level colors */
.membership-member {
    color: #007cba;
}

.membership-officer {
    color: #dc3545;
}

.membership-governors {
    color: #6f42c1;
}

.membership-emeritus {
    color: #fd7e14;
}

.membership-executive-director {
    color: #28a745;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .golf-btn,
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .golf-form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Print styles */
@media print {
    .golf-btn,
    .btn,
    .golf-tournament-actions,
    .golf-directory-controls,
    .form-actions {
        display: none !important;
    }
    
    .golf-tournament-signup,
    .golf-leadership-grid,
    .golf-member-directory,
    .golf-tournaments-list,
    .golf-roster-container,
    .golf-results-container {
        color: #000 !important;
        background: #fff !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .golf-btn,
    .btn {
        border: 2px solid currentColor;
    }
    
    .golf-form-control {
        border: 2px solid #000;
    }
    
    .golf-form-control:focus {
        border-color: #0056b3;
        box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.5);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .golf-btn,
    .btn,
    .golf-form-control,
    .golf-spinner {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .golf-tournament-signup,
    .golf-leadership-grid,
    .golf-member-directory,
    .golf-tournaments-list {
        color: #e9ecef;
    }
    
    .golf-form-control {
        background-color: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .golf-form-control:focus {
        background-color: #495057;
        border-color: #007cba;
        color: #e9ecef;
    }
    
    .golf-form-control::placeholder {
        color: #adb5bd;
    }
}

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

/* Focus visible polyfill */
.golf-btn:focus-visible,
.btn:focus-visible,
.golf-form-control:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Skip to content link */
.golf-skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #007cba;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.golf-skip-link:focus {
    top: 6px;
}

/* ======================================================
   Tournament Schedule Shortcode
   ====================================================== */
.golf-schedule {
    padding-block: var(--msga-gap-3xl, 4rem);
    background: var(--msga-gold-50, #faf8f3);
}

.golf-schedule__title {
    font-family: var(--msga-font-serif, 'Playfair Display', Georgia, serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--msga-navy, #0b1a3b);
    text-align: center;
    margin-bottom: var(--msga-gap-xl, 2rem);
}

.golf-schedule__list {
    max-width: 720px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.golf-schedule__item {
    display: flex;
    align-items: baseline;
    gap: var(--msga-gap-md, 1rem);
    padding-block: var(--msga-gap-md, 1rem);
    border-bottom: 1px solid var(--msga-gray-200, #e2e5e9);
}

.golf-schedule__item:first-child {
    border-top: 1px solid var(--msga-gray-200, #e2e5e9);
}

.golf-schedule__item--featured {
    background: var(--msga-white, #fff);
    margin-inline: calc(-1 * var(--msga-gap-md, 1rem));
    padding-inline: var(--msga-gap-md, 1rem);
    border-radius: 6px;
    border: 1px solid var(--msga-gray-200, #e2e5e9);
    border-bottom: 1px solid var(--msga-gray-200, #e2e5e9);
    margin-block: var(--msga-gap-xs, 0.25rem);
}

.golf-schedule__date {
    flex-shrink: 0;
    min-width: 145px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--msga-navy, #0b1a3b);
    line-height: 1.5;
}

.golf-schedule__detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.golf-schedule__course {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--msga-gray-700, #343a40);
    text-decoration: none;
    transition: color 0.15s ease;
}

a.golf-schedule__course:hover {
    color: var(--msga-gold-dark, #87734a);
    text-decoration: underline;
}

.golf-schedule__city-state {
    font-size: 0.8125rem;
    color: var(--msga-gray-500, #6c757d);
    font-style: normal;
}

.golf-schedule__desc {
    font-size: 0.8125rem;
    color: var(--msga-gold-dark, #87734a);
    font-style: italic;
}

@media (max-width: 600px) {
    .golf-schedule__item {
        flex-direction: column;
        gap: 2px;
    }

    .golf-schedule__date {
        min-width: unset;
    }
}

/* ======================================================
   Single Location Page
   ====================================================== */
.golf-location-single {
    padding-block: var(--msga-gap-2xl, 3rem);
}

.golf-location-single__inner {
    max-width: 900px;
    margin-inline: auto;
    padding-inline: var(--msga-gap-lg, 1.5rem);
}

.golf-location-single__hero {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--msga-gap-xl, 2rem);
}

.golf-location-single__hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 400px;
}

.golf-location-single__header {
    margin-bottom: var(--msga-gap-xl, 2rem);
    border-bottom: 1px solid var(--msga-gray-200, #e2e5e9);
    padding-bottom: var(--msga-gap-lg, 1.5rem);
}

.golf-location-single__name {
    font-family: var(--msga-font-serif, 'Playfair Display', Georgia, serif);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--msga-navy, #0b1a3b);
    margin: 0 0 var(--msga-gap-xs, 0.25rem);
}

.golf-location-single__city-state {
    font-size: 1.125rem;
    color: var(--msga-gray-500, #6c757d);
    margin: 0;
}

.golf-location-single__body {
    display: flex;
    flex-direction: column;
    gap: var(--msga-gap-xl, 2rem);
}

.golf-location-single__section-title {
    font-family: var(--msga-font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.25rem;
    color: var(--msga-navy, #0b1a3b);
    margin: 0 0 var(--msga-gap-md, 1rem);
    padding-bottom: var(--msga-gap-sm, 0.5rem);
    border-bottom: 2px solid var(--msga-gold-200, #e3d9c3);
}

.golf-location-single__details {
    margin: 0;
    display: grid;
    gap: 0;
}

.golf-location-single__detail-row {
    display: flex;
    gap: var(--msga-gap-md, 1rem);
    padding-block: var(--msga-gap-sm, 0.5rem);
    border-bottom: 1px solid var(--msga-gray-100, #f1f3f5);
}

.golf-location-single__detail-row:last-child {
    border-bottom: none;
}

.golf-location-single__detail-row dt {
    min-width: 120px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--msga-gray-600, #495057);
}

.golf-location-single__detail-row dd {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--msga-gray-700, #343a40);
}

.golf-location-single__detail-row a {
    color: var(--msga-navy, #0b1a3b);
    text-decoration: none;
}

.golf-location-single__detail-row a:hover {
    color: var(--msga-gold-dark, #87734a);
    text-decoration: underline;
}

.golf-location-single__content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--msga-gray-700, #343a40);
}

.golf-location-single__tournament-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.golf-location-single__tournament-item {
    border-bottom: 1px solid var(--msga-gray-100, #f1f3f5);
}

.golf-location-single__tournament-item:last-child {
    border-bottom: none;
}

.golf-location-single__tournament-item a {
    display: flex;
    gap: var(--msga-gap-md, 1rem);
    padding-block: var(--msga-gap-sm, 0.5rem);
    text-decoration: none;
    color: var(--msga-gray-700, #343a40);
    transition: color 0.15s ease;
}

.golf-location-single__tournament-item a:hover {
    color: var(--msga-gold-dark, #87734a);
}

.golf-location-single__tournament-item--past a {
    color: var(--msga-gray-400, #9ba2ad);
}

.golf-location-single__tournament-date {
    flex-shrink: 0;
    min-width: 130px;
    font-size: 0.875rem;
    font-weight: 600;
}

.golf-location-single__tournament-name {
    font-size: 0.9375rem;
}

@media (max-width: 600px) {
    .golf-location-single__detail-row {
        flex-direction: column;
        gap: 2px;
    }

    .golf-location-single__detail-row dt {
        min-width: unset;
    }

    .golf-location-single__tournament-item a {
        flex-direction: column;
        gap: 2px;
    }

    .golf-location-single__tournament-date {
        min-width: unset;
    }
}
