/**
 * Office Events Calendar Buttons
 * Irvine Company Office Brand Colors (from Brand Guide September 2022)
 * Matches confirmation.css design system
 * Email-safe CSS with fallback inline styles
 */

/* Irvine Company Office Brand Colors (Pantone Specifications) */
:root {
    --ico-blue: #5B6E7F;        /* Pantone 540 — primary brand blue */
    --ico-ink: #58595B;         /* Pantone 431 — dark gray body text */
    --ico-line: #DCDDDE;        /* Pantone 427 — light gray keylines */
    --ico-accent: #3b3c3f;      /* Dark gray - calendar buttons */
    --ico-accent-hover: #2a2b2d; /* Darker gray for hover */
    --ico-red: #DA291C;         /* Pantone 485 — red accent */
    --ico-white: #ffffff;
    --ico-muted: #8a8b8d;       /* Derived gray for labels */
}

/* Container */
.oe-calendar-buttons {
    margin: 1.25rem 0;
    padding: 0;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Label */
.oe-calendar-label {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 0.75rem;
    color: var(--ico-ink);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.oe-calendar-label i {
    font-size: 1.1rem;
    color: var(--ico-accent);
}

/* Button container - icon-only single row */
.oe-calendar-links {
    display: flex;
    flex-wrap: nowrap;
    gap: .75em;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

/* Individual calendar buttons - Icon-only design (July 2026) */
.oe-cal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--ico-accent);
    color: var(--ico-white);
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: 0;
    min-width: 48px;
    min-height: 48px;
    width: 48px;
    height: 48px;
    position: relative;
    overflow: hidden;
}

.oe-cal-btn:hover {
    color: var(--ico-white);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(88, 89, 91, 0.28);
}

.oe-cal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(88, 89, 91, 0.14);
}

.oe-cal-btn:focus,
.oe-cal-btn:focus-visible {
    outline: 2px solid var(--ico-red);
    outline-offset: 2px;
}

/* Icon spacing */
.oe-cal-icon {
    margin-right: 8px;
    display: inline-block;
    line-height: 1;
    font-size: 1.1em;
}

/* SVG icon styles - centered in icon-only buttons */
.oe-cal-btn svg {
    width: 24px;
    height: 24px;
    margin: 0;
    vertical-align: middle;
    display: block;
    flex-shrink: 0;
}

/* Platform-specific icon sizes - Apple and Yahoo use larger icons */
.oe-cal-apple svg,
.oe-cal-yahoo svg {
    width: 32px;
    height: 32px;
}

/* Allow SVG icons to use their original colors - do NOT override fill */

/* Screen reader only text (visually hidden but accessible) */
.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;
}

/* All platforms use consistent dark gray background */
.oe-cal-apple,
.oe-cal-google,
.oe-cal-office,
.oe-cal-outlook,
.oe-cal-yahoo {
    background: var(--ico-accent);
}

/* Error messages */
.oe-calendar-error {
    color: var(--ico-red);
    padding: 12px 16px;
    background: rgba(218, 41, 28, 0.1);
    border-left: 4px solid var(--ico-red);
    border-radius: 2px;
    margin: 16px 0;
    font-size: 0.9375rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive design - icon-only buttons stay in single row */
@media screen and (max-width: 768px) {
    .oe-calendar-buttons {
        margin: 20px 0;
    }

    .oe-calendar-links {
        gap: 6px;
    }

    .oe-cal-btn {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
        padding: 10px;
    }

    .oe-cal-btn svg {
        width: 22px;
        height: 22px;
    }

    .oe-cal-apple svg,
    .oe-cal-yahoo svg {
        width: 29px;
        height: 29px;
    }
}

@media screen and (max-width: 480px) {
    .oe-calendar-buttons {
        margin: 16px 0;
    }

    .oe-calendar-links {
        gap: 4px;
    }

    .oe-cal-btn {
        min-width: 40px;
        min-height: 40px;
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .oe-cal-btn svg {
        width: 20px;
        height: 20px;
    }

    .oe-cal-apple svg,
    .oe-cal-yahoo svg {
        width: 27px;
        height: 27px;
    }
}

/* Email client fallbacks (for when external CSS is stripped) */
/* These are duplicated as inline styles in the HTML generator */

/* Print styles */
@media print {
    .oe-calendar-buttons {
        page-break-inside: avoid;
    }

    .oe-cal-btn {
        border: 1px solid var(--ico-ink);
        color: var(--ico-ink);
        background: var(--ico-white);
    }
}

/* High contrast for accessibility */
@media (prefers-contrast: high) {
    .oe-cal-btn {
        border: 2px solid currentColor;
        font-weight: 600;
    }

    .oe-calendar-label {
        font-weight: 700;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .oe-cal-btn {
        transition: none;
    }

    .oe-cal-btn:hover {
        transform: none;
    }

    .oe-cal-btn:active {
        transform: none;
    }
}

/* Dark mode support (for modern email clients) */
@media (prefers-color-scheme: dark) {
    .oe-calendar-buttons {
        color: var(--ico-white);
    }

    .oe-calendar-label {
        color: rgba(255, 255, 255, 0.87);
    }

    .oe-calendar-error {
        background: rgba(218, 41, 28, 0.2);
        color: #ff6b6b;
    }
}