/**
 * Copyright © ApdSuite. All rights reserved.
 * APD Suite Support Bar Widget Styles (CSS Direct)
 */

/* Variables as CSS custom properties */
:root {
    --apdsuite-support-bar-bg: #ffffff;
    --apdsuite-support-bar-border-radius: 8px;
    --apdsuite-support-bar-padding: 20px;
    --apdsuite-support-bar-gap: 15px;
    --apdsuite-support-bar-max-width: 700px;
    
    --apdsuite-support-bar-item-bg: #1870d5;
    --apdsuite-support-bar-item-bg-hover: #1558a8;
    --apdsuite-support-bar-item-color: #ffffff;
    --apdsuite-support-bar-item-height: 56px; /* Altura fija para todos */
    --apdsuite-support-bar-item-padding: 0 20px; /* Sin padding vertical para altura fija */
    --apdsuite-support-bar-item-border-radius: 8px;
    --apdsuite-support-bar-item-min-width: 200px;
    --apdsuite-support-bar-item-font-size: 16px;
    --apdsuite-support-bar-item-font-weight: 600;
    
    --apdsuite-support-bar-icon-size: 24px;
    --apdsuite-support-bar-icon-margin: 10px;
    
    --apdsuite-support-bar-transition: all 0.3s ease-in-out;
}

/* Main Support Bar Styles */
.apdsuite-support-bar__title {
    text-align: center;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.apdsuite-support-bar__container {
    display: flex;
    flex-wrap: wrap;
    background-color: var(--apdsuite-support-bar-bg);
    padding: var(--apdsuite-support-bar-padding);
    border-radius: var(--apdsuite-support-bar-border-radius);
    gap: var(--apdsuite-support-bar-gap);
    width: 90%;
    max-width: var(--apdsuite-support-bar-max-width);
    justify-content: center;
    align-items: stretch; /* Importante para altura uniforme */
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Support Bar Items (Base) */
.apdsuite-support-bar__item {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--apdsuite-support-bar-item-bg);
    color: var(--apdsuite-support-bar-item-color);
    padding: var(--apdsuite-support-bar-item-padding);
    height: var(--apdsuite-support-bar-item-height); /* Altura fija */
    border-radius: var(--apdsuite-support-bar-item-border-radius);
    cursor: pointer;
    transition: var(--apdsuite-support-bar-transition);
    flex: 1 1 auto; /* Flex grow y shrink automático */
    min-width: var(--apdsuite-support-bar-item-min-width);
    text-decoration: none;
    font-size: var(--apdsuite-support-bar-item-font-size);
    font-weight: var(--apdsuite-support-bar-item-font-weight);
    border: none;
    outline: none;
    font-family: inherit;
    box-sizing: border-box; /* Importante para consistencia */
}

.apdsuite-support-bar__item:hover,
.apdsuite-support-bar__item:focus {
    background: var(--apdsuite-support-bar-item-bg-hover);
    color: var(--apdsuite-support-bar-item-color);
    text-decoration: none;
    transform: translateY(-1px);
}

.apdsuite-support-bar__item:active {
    transform: translateY(1px);
}

.apdsuite-support-bar__item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apdsuite-support-bar__item:disabled:hover {
    background: var(--apdsuite-support-bar-item-bg);
    transform: none;
}

/* Icon Styles */
.apdsuite-support-bar__icon {
    margin-right: var(--apdsuite-support-bar-icon-margin);
    fill: currentColor;
    width: var(--apdsuite-support-bar-icon-size);
    height: var(--apdsuite-support-bar-icon-size);
    flex-shrink: 0;
}

/* Text Styles */
.apdsuite-support-bar__text {
    white-space: nowrap;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .apdsuite-support-bar__container {
        flex-direction: column;
        align-items: stretch; /* Mantener altura uniforme en móvil */
        width: 95%;
        padding: 16px;
    }
    
    .apdsuite-support-bar__item {
        width: 100%;
        min-width: auto;
        height: var(--apdsuite-support-bar-item-height); /* Mantener altura fija */
    }
    
    .apdsuite-support-bar__text {
        white-space: normal;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --apdsuite-support-bar-item-height: 50px; /* Ajuste para móviles pequeños */
    }
    
    .apdsuite-support-bar__container {
        padding: 12px;
        gap: 12px;
    }
    
    .apdsuite-support-bar__item {
        font-size: 14px;
        padding: 0 16px; /* Solo padding horizontal */
        height: var(--apdsuite-support-bar-item-height); /* Altura consistente */
    }
    
    .apdsuite-support-bar__icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
}

/* Specific button variations */
.apdsuite-support-bar__item--phone {
    background: #1870d5; /* Azul call */
    order: 1; /* Orden: primero */
}

.apdsuite-support-bar__item--phone:hover {
    background: #1558a8;
}

.apdsuite-support-bar__item--chat {
    background: #6b7280; /* Gris chat */
    color: #ffffff;
    order: 2; /* Orden: segundo */
    border: 2px solid #d1d5db;
}

.apdsuite-support-bar__item--chat:hover {
    background: #4b5563;
    border-color: #9ca3af;
}

.apdsuite-support-bar__item--callback {
    background: #1870d5; /* Azul callback */
    order: 3; /* Orden: tercero */
}

.apdsuite-support-bar__item--callback:hover {
    background: #1558a8;
}

/* Asegurar que todos tengan la misma altura independiente del contenido */
.apdsuite-support-bar__item--phone,
.apdsuite-support-bar__item--chat,
.apdsuite-support-bar__item--callback {
    height: var(--apdsuite-support-bar-item-height);
    min-height: var(--apdsuite-support-bar-item-height);
    max-height: var(--apdsuite-support-bar-item-height);
} 