/**
 * Add to Calendar Styles
 *
 * @package Intellivents
 * @since 1.0.0
 */

/* Dropdown Style */
.intellivents-calendar-dropdown {
    position: relative;
    display: inline-block;
}

.intellivents-calendar-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.intellivents-calendar-trigger .dashicons-arrow-down-alt2 {
    font-size: 14px;
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.intellivents-calendar-dropdown.open .dashicons-arrow-down-alt2 {
    transform: rotate(180deg);
}

.intellivents-calendar-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 200px;
    background: var(--intellivents-white);
    border: 1px solid var(--intellivents-border);
    border-radius: var(--intellivents-radius);
    box-shadow: var(--intellivents-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.intellivents-calendar-dropdown.open .intellivents-calendar-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.intellivents-calendar-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--intellivents-text);
    text-decoration: none;
    transition: background 0.2s ease;
}

.intellivents-calendar-option:first-child {
    border-radius: var(--intellivents-radius) var(--intellivents-radius) 0 0;
}

.intellivents-calendar-option:last-child {
    border-radius: 0 0 var(--intellivents-radius) var(--intellivents-radius);
}

.intellivents-calendar-option:hover {
    background: var(--intellivents-bg);
    color: var(--intellivents-primary);
}

/* Calendar Icons */
.intellivents-icon-google,
.intellivents-icon-outlook,
.intellivents-icon-apple,
.intellivents-icon-yahoo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.intellivents-icon-google {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E");
}

.intellivents-icon-outlook {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%230078D4' d='M24 7.387v10.478c0 .23-.08.424-.238.576-.158.152-.353.228-.587.228h-8.5v-7.3l1.91 1.53c.09.072.197.108.32.108.122 0 .228-.036.318-.108l6.54-5.235c.078-.06.138-.11.18-.15.042-.04.082-.1.12-.18.037-.08.056-.17.056-.27v-.46c0-.158-.055-.295-.165-.41-.11-.115-.247-.172-.41-.172H15.67v2.22h7.77c.062 0 .115.02.16.06.045.04.067.09.067.15v.002zm-9.17 4.523V2.677c0-.153-.053-.283-.16-.39-.107-.107-.237-.16-.39-.16H.56c-.153 0-.283.053-.39.16-.107.107-.16.237-.16.39v12.646c0 .153.053.283.16.39.107.107.237.16.39.16h13.72c.153 0 .283-.053.39-.16.107-.107.16-.237.16-.39V11.91zM7.25 12.35c-1.104 0-2.004-.338-2.7-1.013-.696-.675-1.044-1.558-1.044-2.65 0-1.117.348-2.017 1.044-2.7.696-.683 1.596-1.024 2.7-1.024 1.092 0 1.985.34 2.678 1.024.693.683 1.04 1.583 1.04 2.7 0 1.092-.347 1.975-1.04 2.65-.693.675-1.586 1.013-2.678 1.013zm0-1.68c.535 0 .964-.19 1.287-.57.323-.38.485-.88.485-1.5 0-.632-.162-1.138-.485-1.52-.323-.382-.752-.573-1.287-.573-.547 0-.98.191-1.3.573-.32.382-.48.888-.48 1.52 0 .62.16 1.12.48 1.5.32.38.753.57 1.3.57z'/%3E%3C/svg%3E");
}

.intellivents-icon-apple {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z'/%3E%3C/svg%3E");
}

.intellivents-icon-yahoo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236001D2' d='M12.913 13.77L17.06 2h-3.613l-2.253 7.29L8.878 2H5.143L9.39 13.77v7.706h3.523V13.77zM20.86 8.56c-1.024 0-1.854.815-1.854 1.82 0 1.003.83 1.82 1.855 1.82 1.024 0 1.854-.817 1.854-1.82 0-1.005-.83-1.82-1.854-1.82zm-.927 5.04h1.854v7.876h-1.854V13.6z'/%3E%3C/svg%3E");
}

/* Buttons Style */
.intellivents-style-buttons .intellivents-calendar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.intellivents-style-buttons .intellivents-calendar-buttons .intellivents-btn {
    flex: 1;
    min-width: 80px;
}

/* Add to Calendar in Single Event */
.intellivents-event-details-card .intellivents-add-to-calendar {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--intellivents-border);
}

.intellivents-event-details-card .intellivents-calendar-trigger {
    width: 100%;
    justify-content: center;
}

/* Responsive */
@media (max-width: 480px) {
    .intellivents-calendar-menu {
        min-width: 180px;
    }
    
    .intellivents-style-buttons .intellivents-calendar-buttons {
        flex-direction: column;
    }
    
    .intellivents-style-buttons .intellivents-calendar-buttons .intellivents-btn {
        width: 100%;
    }
}
