/* ============================================================================
   Scheduling Button Component
   Configurable CTA button for external scheduling services (Calendly, etc.)
   ========================================================================== */

:root {
    --scheduling-color-primary: #679d2d;
    --scheduling-color-dark: #557a24;
    --scheduling-color-light: #7ab83f;
    --scheduling-color-hover: #5a8a26;
    --scheduling-shadow-base: 0 4px 12px rgba(103, 157, 45, 0.15);
    --scheduling-shadow-hover: 0 8px 24px rgba(103, 157, 45, 0.3);
    --scheduling-shadow-active: 0 2px 8px rgba(103, 157, 45, 0.2);
}

/* Dark mode color adjustments */
@media (prefers-color-scheme: dark) {
    :root {
        --scheduling-color-primary: #7ab83f;
        --scheduling-color-dark: #679d2d;
        --scheduling-color-light: #8cc94a;
        --scheduling-color-hover: #6fa635;
    }
}

/* Container wrapper */
.scheduling-button-container {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

/* Main button styling */
.btn-scheduling {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    padding: 1rem 1.75rem;
    min-height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, var(--scheduling-color-primary) 0%, var(--scheduling-color-dark) 100%);
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
    cursor: pointer;
    box-shadow: var(--scheduling-shadow-base);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
}

/* Pseudo-element for gradient animation on hover */
.btn-scheduling::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--scheduling-color-hover) 0%, var(--scheduling-color-dark) 100%);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

/* Hover state */
.btn-scheduling:hover {
    box-shadow: var(--scheduling-shadow-hover);
    transform: translateY(-2px);
}

.btn-scheduling:hover::before {
    left: 0;
}

/* Active/pressed state */
.btn-scheduling:active {
    box-shadow: var(--scheduling-shadow-active);
    transform: translateY(0);
}

/* Focus state for keyboard navigation (WCAG AA) */
.btn-scheduling:focus-visible {
    outline: 3px solid var(--scheduling-color-primary);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Text wrapper */
.scheduling-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    text-align: left;
}

/* Main button text */
.scheduling-main {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Secondary subtext */
.scheduling-subtext {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.95;
    letter-spacing: 0.25px;
}

/* Icon styling */
.scheduling-icon,
.scheduling-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Arrow animation on hover */
.btn-scheduling:hover .scheduling-arrow {
    animation: slideArrow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideArrow {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Pulse animation for idle state (accessibility: respects prefers-reduced-motion) */
.btn-scheduling {
    animation: subtlePulse 3s ease-in-out infinite;
}

@keyframes subtlePulse {
    0%, 100% {
        box-shadow: var(--scheduling-shadow-base);
    }
    50% {
        box-shadow: 0 6px 16px rgba(103, 157, 45, 0.2);
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .btn-scheduling,
    .btn-scheduling::before,
    .btn-scheduling:hover .scheduling-arrow {
        animation: none;
        transition: none;
    }

    .btn-scheduling:hover {
        box-shadow: var(--scheduling-shadow-base);
        transform: none;
    }
}

/* Responsive adjustments for tablets */
@media (max-width: 768px) {
    .scheduling-button-container {
        margin: 1.5rem 0;
    }

    .btn-scheduling {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px;
    }

    .scheduling-icon,
    .scheduling-arrow {
        font-size: 1.125rem;
    }

    .scheduling-main {
        font-size: 0.95rem;
    }

    .scheduling-subtext {
        font-size: 0.7rem;
    }
}

/* Responsive adjustments for mobile phones */
@media (max-width: 480px) {
    .scheduling-button-container {
        margin: 1rem 0;
        padding: 0 0.5rem;
    }

    .btn-scheduling {
        padding: 0.75rem 1rem;
        gap: 0.625rem;
        font-size: 0.9rem;
        min-height: 48px;
        width: 100%;
    }

    .scheduling-text {
        flex: 1;
    }

    .scheduling-icon,
    .scheduling-arrow {
        font-size: 1rem;
    }

    .scheduling-main {
        font-size: 0.9rem;
    }

    .scheduling-subtext {
        font-size: 0.65rem;
    }

    /* Stack icons vertically on very small screens if needed */
    @media (max-width: 360px) {
        .btn-scheduling {
            padding: 0.75rem 0.875rem;
            gap: 0.5rem;
        }

        .scheduling-main {
            font-size: 0.85rem;
        }

        .scheduling-subtext {
            font-size: 0.6rem;
        }
    }
}

/* High contrast mode support (for accessibility) */
@media (prefers-contrast: more) {
    .btn-scheduling {
        border: 2px solid currentColor;
        box-shadow: var(--scheduling-shadow-base), 0 0 0 2px var(--scheduling-color-primary);
    }

    .btn-scheduling:hover {
        box-shadow: var(--scheduling-shadow-hover), 0 0 0 2px var(--scheduling-color-primary);
    }
}

/* Print media - hide animations */
@media print {
    .scheduling-button-container {
        display: none;
    }
}
