/* Add to Calendar Plugin Styles */

.atc-container {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.atc-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: #007cba;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
    line-height: 1;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.atc-button:hover {
    background-color: #005a87;
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
    transform: translateY(-1px);
}

.atc-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.3);
}

.atc-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.atc-icon {
    flex-shrink: 0;
}

.atc-chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.atc-container.open .atc-chevron {
    transform: rotate(180deg);
}

/* Dropdown Styles */
.atc-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.atc-container.open .atc-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.atc-dropdown-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    overflow: hidden;
}

.atc-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    line-height: 1.2;
}

.atc-option:hover {
    background-color: #f8f9fa;
    color: #333333;
}

.atc-option:focus {
    outline: none;
    background-color: #e3f2fd;
}

.atc-option-icon {
    flex-shrink: 0;
}

/* Platform-specific styling */
.atc-google:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.atc-apple:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.atc-outlook:hover {
    background-color: rgba(0, 120, 212, 0.1);
}

.atc-yahoo:hover {
    background-color: rgba(123, 0, 153, 0.1);
}

.atc-ical:hover {
    background-color: rgba(102, 102, 102, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .atc-button {
        padding: 10px 16px;
        font-size: 13px;
    }

    .atc-dropdown {
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        min-width: 180px;
    }

    .atc-container.open .atc-dropdown {
        transform: translateX(-50%) translateY(0);
    }

    .atc-option {
        padding: 14px 16px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .atc-button {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .atc-dropdown {
        left: 0;
        right: 0;
        transform: translateY(-10px);
        min-width: auto;
    }

    .atc-container.open .atc-dropdown {
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .atc-button {
        border: 2px solid currentColor;
    }

    .atc-dropdown-content {
        border: 2px solid #333333;
    }

    .atc-option {
        border-bottom: 1px solid #e0e0e0;
    }

    .atc-option:last-child {
        border-bottom: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .atc-button,
    .atc-chevron,
    .atc-dropdown,
    .atc-option {
        transition: none;
    }

    .atc-button:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .atc-dropdown-content {
        background: #2d2d2d;
        border-color: #444444;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    .atc-option {
        color: #e0e0e0;
    }

    .atc-option:hover {
        background-color: #404040;
        color: #ffffff;
    }

    .atc-option:focus {
        background-color: #1976d2;
    }
}

/* Error message styling */
.atc-error {
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 14px;
    font-weight: 500;
}

/* Loading state */
.atc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.atc-loading .atc-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: atc-spin 1s linear infinite;
}

@keyframes atc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Focus management for accessibility */
.atc-container:focus-within .atc-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Custom button styling support */
.atc-button.large {
    padding: 16px 24px;
    font-size: 16px;
}

.atc-button.small {
    padding: 8px 12px;
    font-size: 12px;
}

.atc-button.rounded {
    border-radius: 25px;
}

.atc-button.square {
    border-radius: 0;
}

.atc-button.minimal {
    background: transparent;
    border: 2px solid currentColor;
    box-shadow: none;
}

.atc-button.minimal:hover {
    background: currentColor;
    color: #ffffff;
}