/* Instant Touch Widget Styles */
:root {
    --itw-primary: #3db000; /* Vibrant Green */
    --itw-hover: #329000;
    --itw-bg: #ffffff;
    --itw-text: #1a1a1a;
    --itw-gray: #f9fafb;
    --itw-border: #f1f3f5;
    --itw-shadow: -10px 0 30px rgba(0,0,0,0.12);
    --itw-radius: 12px;
    --itw-transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
    --itw-icon-fill: #ffffff;
    --itw-font-size: 14px;
}

#itw-contact-widget {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%) translateX(240px); /* 320 - 80 = 240. Shows 80px */
    width: 320px;
    background: var(--itw-bg);
    box-shadow: var(--itw-shadow);
    border-radius: var(--itw-radius) 0 0 var(--itw-radius);
    z-index: 2147483647; /* Extreme z-index to stay above everything */
    transition: var(--itw-transition);
    font-family: inherit;
    overflow: hidden;
}

#itw-contact-widget:hover {
    transform: translateY(-50%) translateX(0);
}

/* Header */
.itw-header {
    background: var(--itw-primary);
    color: #fff;
    padding: 0;
    height: 54px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.itw-header-icon {
    width: 80px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.itw-header-text {
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--itw-transition);
    font-weight: 700;
    font-size: 14px;
}

#itw-contact-widget:hover .itw-header-text {
    opacity: 1;
    visibility: visible;
}

/* Remove old Handle Styles */
.itw-toggle-handle, .itw-toggle-icon {
    display: none;
}

#itw-contact-widget:hover .itw-toggle-handle {
    opacity: 0;
    pointer-events: none;
}

/* Content Body */
.itw-body {
    padding: 0;
}

.itw-content {
    opacity: 1;
    transform: translateX(0);
}

/* Rows */
.itw-row {
    display: flex;
    align-items: stretch; /* Content spans full height */
    padding: 0;
    min-height: 74px;
    height: auto;
    border-bottom: 1px solid var(--itw-border);
    transition: background 0.3s ease;
}

.itw-row:last-child {
    border-bottom: none;
}

.itw-row:hover {
    background: var(--itw-gray);
}

.itw-icon-box {
    width: 80px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.itw-icon-inner {
    width: 44px;
    height: 44px;
    background: var(--itw-primary);
    color: var(--itw-icon-fill);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.itw-row:hover .itw-icon-inner {
    transform: scale(1.08);
}

.itw-row:hover .itw-icon-box {
    transform: scale(1.05);
}

.itw-icon-box svg {
    width: 24px;
    height: 24px;
}

/* Text */
#itw-contact-widget:hover .itw-text {
    opacity: 1;
    visibility: visible;
    white-space: normal;
}

.itw-text {
    opacity: 0;
    visibility: hidden;
    transition: var(--itw-transition);
    white-space: nowrap;
    padding: 15px 20px 15px 10px;
    flex: 1;
    overflow: visible;
}

.itw-text small {
    display: block;
    color: #888;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.itw-text p, .itw-text a {
    margin: 0;
    color: var(--itw-text);
    font-size: var(--itw-font-size);
    font-weight: 500;
    text-decoration: none;
    line-height: 1.5;
    display: block;
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

.itw-text a:hover {
    color: var(--itw-primary);
}

/* Social Row */
.itw-social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.itw-social-icon {
    width: 38px !important;
    height: 38px !important;
    background: var(--itw-primary) !important;
    color: var(--itw-icon-fill) !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    transition: all 0.3s ease;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
}

.itw-social-icon svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

.itw-social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(46, 139, 0, 0.3);
    background: var(--itw-hover);
}

/* Visibility Controls */
@media (min-width: 769px) {
    #itw-contact-widget {
        display: var(--itw-desktop-display) !important;
    }
}

@media (max-width: 768px) {
    #itw-contact-widget {
        display: var(--itw-mobile-display) !important;
    }
}

/* Responsive Styles */
@media (max-width: 480px) {
    #itw-contact-widget {
        width: 280px;
        transform: translateY(-50%) translateX(calc(100% - 50px));
    }
    
    .itw-toggle-handle {
        width: 50px;
    }
    
    .itw-row {
        padding: 12px 15px;
    }
    
    .itw-icon-box {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }
    
    .itw-icon-box svg {
        width: 20px;
        height: 20px;
    }
}
