/* WP Call to Action Frontend Styles */

.wp-cta-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Toggle Button */
.cta-toggle {
    width: 60px;
    height: 60px;
    background: #007cba;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.cta-toggle:hover {
    background: #005a87;
    transform: scale(1.1);
}

.cta-toggle i {
    color: white;
    font-size: 24px;
}

/* Buttons Container */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Toggle button removed - buttons always visible */

/* Individual Buttons */
.cta-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cta-button i {
    color: white;
    font-size: 18px;
}

.cta-button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Layout: Horizontal Circle */
.cta-layout-horizontal-circle .cta-buttons {
    flex-direction: row;
    gap: 8px;
}

.cta-layout-horizontal-circle .cta-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007cba;
}

.cta-layout-horizontal-circle .cta-button:hover {
    background: var(--hover-color, #005a87);
}

/* Layout: Vertical Square */
.cta-layout-vertical-square .cta-button {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #007cba;
}

.cta-layout-vertical-square .cta-button:hover {
    background: var(--hover-color, #005a87);
}

/* Layout: Vertical Rectangle */
.cta-layout-vertical-rectangle .cta-button {
    width: 120px;
    height: 40px;
    border-radius: 8px;
    background: #007cba;
    justify-content: flex-start;
    padding: 0 12px;
    gap: 8px;
}

.cta-layout-vertical-rectangle .cta-button:hover {
    background: var(--hover-color, #005a87);
}

.cta-layout-vertical-rectangle .button-text {
    color: white;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-buttons {
    animation: slideIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cta-toggle {
        width: 50px;
        height: 50px;
    }
    
    .cta-toggle i {
        font-size: 20px;
    }
    
    .cta-layout-horizontal-circle .cta-button {
        width: 45px;
        height: 45px;
    }
    
    .cta-layout-vertical-square .cta-button {
        width: 45px;
        height: 45px;
    }
    
    .cta-layout-vertical-rectangle .cta-button {
        width: 100px;
        height: 35px;
        padding: 0 8px;
    }
    
    .cta-layout-vertical-rectangle .button-text {
        font-size: 11px;
    }
    
    .cta-button i {
        font-size: 16px;
    }
    
    .cta-button img {
        width: 20px;
        height: 20px;
    }
}

/* Accessibility */
.cta-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cta-toggle,
    .cta-button {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cta-toggle,
    .cta-button,
    .cta-buttons {
        transition: none;
        animation: none;
    }
    
    .cta-button:hover {
        transform: none;
    }
    
    .cta-toggle:hover {
        transform: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cta-toggle {
        background: #005a87;
    }
    
    .cta-toggle:hover {
        background: #004085;
    }
    
    .cta-button {
        background: #005a87;
    }
    
    .cta-button:hover {
        background: var(--hover-color, #004085);
    }
}

/* Print styles */
@media print {
    .wp-cta-container {
        display: none !important;
    }
}

/* Loading state */
.wp-cta-container.loading .cta-toggle {
    pointer-events: none;
    opacity: 0.7;
}

.wp-cta-container.loading .cta-toggle i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Custom hover effects for different button types */
.cta-button[href*="facebook"]:hover {
    background: #1877f2 !important;
}

.cta-button[href*="instagram"]:hover {
    background: #e4405f !important;
}

.cta-button[href*="twitter"]:hover {
    background: #1da1f2 !important;
}

.cta-button[href*="youtube"]:hover {
    background: #ff0000 !important;
}

.cta-button[href*="pinterest"]:hover {
    background: #bd081c !important;
}

.cta-button[href*="zalo"]:hover {
    background: #0068ff !important;
}

.cta-button[href*="skype"]:hover {
    background: #00aff0 !important;
}

.cta-button[href^="mailto:"]:hover {
    background: #ea4335 !important;
}

.cta-button[href^="tel:"]:hover,
.cta-button[href^="sms:"]:hover {
    background: #28a745 !important;
}

/* Tooltip */
.cta-button::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.cta-button:hover::after {
    opacity: 1;
}

/* Mobile touch improvements */
@media (hover: none) and (pointer: coarse) {
    .cta-button:hover {
        transform: none;
    }
    
    .cta-toggle:hover {
        transform: none;
    }
    
    .cta-button::after {
        display: none;
    }
}

/* ===== HOTLINE BUTTON STYLES ===== */

.wp-hotline-container {
    position: fixed;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    /* Border sẽ được override bởi inline styles từ PHP */
}

.hotline-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 12px 20px;
    gap: 8px;
    min-width: 60px;
    min-height: 60px;
}

.hotline-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.hotline-button i {
    font-size: 20px;
    color: inherit;
}

.hotline-number {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
}

/* Hotline Layout: Always show number */
.hotline-button {
    border-radius: 50px;
    padding: 12px 20px;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* Hotline Animation */
@keyframes hotlinePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.wp-hotline-container:hover {
    animation: hotlinePulse 1s ease-in-out;
}

/* Hotline Responsive */
@media (max-width: 768px) {
    .wp-hotline-container {
        min-width: 50px;
        min-height: 50px;
    }
    
    .hotline-button {
        padding: 10px 16px;
        min-width: 50px;
        min-height: 50px;
    }
    

    
    .hotline-button i {
        font-size: 18px;
    }
    
    .hotline-number {
        font-size: 12px;
    }
}

/* Hotline Accessibility */
.hotline-button:focus {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Hotline High contrast mode */
@media (prefers-contrast: high) {
    .wp-hotline-container {
        border: 2px solid #000;
    }
}

/* Hotline Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wp-hotline-container,
    .hotline-button {
        transition: none;
        animation: none;
    }
    
    .hotline-button:hover {
        transform: none;
    }
    
    .wp-hotline-container:hover {
        animation: none;
    }
}

/* Hotline Dark mode support */
@media (prefers-color-scheme: dark) {
    .wp-hotline-container {
        filter: brightness(0.9);
    }
}

/* Hotline Print styles */
@media print {
    .wp-hotline-container {
        display: none !important;
    }
}

/* Hotline Tooltip */
.hotline-button::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.hotline-button:hover::after {
    opacity: 1;
}

/* Hotline Mobile touch improvements */
@media (hover: none) and (pointer: coarse) {
    .hotline-button:hover {
        transform: none;
    }
    
    .wp-hotline-container:hover {
        animation: none;
    }
    
    .hotline-button::after {
        display: none;
    }
}
