/* ===================================
   ConcreteInfo Website - Enhancements
   WhatsApp Widget, Quality Matrix, Charts
   =================================== */

/* === WHATSAPP FLOATING CHAT BUTTON === */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
}

.whatsapp-float i {
    line-height: 60px;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: whatsappPulse 2s infinite;
    z-index: -1;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* === WHATSAPP POPUP === */
.whatsapp-popup {
    position: fixed;
    bottom: 170px;
    right: 30px;
    width: 350px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 999;
    display: none;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-popup.active {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.whatsapp-popup-header {
    background: #e5461f;
    color: white;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.whatsapp-popup-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.whatsapp-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.whatsapp-popup-body {
    padding: 20px;
    background: #f5f5f5;
}

.whatsapp-message {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.whatsapp-message::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 10px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

.whatsapp-message p {
    margin: 0;
    font-size: 0.9rem;
    color: #333;
}

.whatsapp-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.whatsapp-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.whatsapp-option {
    background: white;
    border: 1px solid #e5461f;
    color: #e5461f;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-option:hover {
    background: #e5461f;
    color: white;
    transform: translateX(5px);
}

.whatsapp-option i {
    font-size: 1.1rem;
}

/* === ENHANCED QUALITY MATRIX STYLES === */
.quality-matrix-enhanced {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.matrix-factor {
    transition: all 0.3s ease;
    cursor: pointer;
}

.matrix-factor:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(229, 70, 31, 0.35) !important;
}

.matrix-center {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* === CHART CONTAINERS === */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-5px);
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #464646;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5461f;
    padding-bottom: 10px;
}

/* === DASHBOARD CHART STYLES === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.metric-card {
    background: linear-gradient(135deg, #e5461f 0%, #ff6b47 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(229, 70, 31, 0.3);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(229, 70, 31, 0.4);
}

.metric-value {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
    margin: 10px 0;
}

.metric-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    float: right;
}

/* === MOBILE RESPONSIVENESS === */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 90px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 26px;
    }

    .whatsapp-popup {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 155px;
    }

    .chart-container {
        height: 250px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .metric-value {
        font-size: 2.5rem;
    }
}

/* === PRINT STYLES === */
@media print {
    .whatsapp-float,
    .whatsapp-popup {
        display: none !important;
    }
}
