/* Pricing Page Specific Styles */

/* Loading Animation for Traffic Selector */
.traffic-selector-loading {
    display: none;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.traffic-selector-loading.show {
    display: block;
}

.skeleton-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.skeleton-item:last-child {
    margin-bottom: 0;
}

.skeleton-radio {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e9ecef;
    margin-right: 8px;
    flex-shrink: 0;
}

.skeleton-text {
    height: 12px;
    background: #e9ecef;
    border-radius: 3px;
    flex: 1;
    margin-right: 8px;
    position: relative;
    overflow: hidden;
}

.skeleton-text.short {
    width: 60px;
}

.skeleton-text.medium {
    width: 90px;
}

.skeleton-text.long {
    width: 120px;
}

.skeleton-icon {
    width: 12px;
    height: 12px;
    background: #e9ecef;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Shimmer Animation */
.skeleton-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        transparent 100%
    );
    animation: shimmer 2s infinite ease-in-out;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Skeleton variations for different traffic types */
.skeleton-item:nth-child(1) .skeleton-text {
    width: 60px;
}

.skeleton-item:nth-child(2) .skeleton-text {
    width: 85px;
}

.skeleton-item:nth-child(3) .skeleton-text {
    width: 105px;
}

.skeleton-item:nth-child(4) .skeleton-text {
    width: 125px;
}

.skeleton-item:nth-child(5) .skeleton-text {
    width: 145px;
}

/* Loading Button Skeleton */
.skeleton-button {
    width: 100%;
    height: 30px;
    background: #e9ecef;
    border-radius: 4px;
    margin: 12px 0;
    position: relative;
    overflow: hidden;
}

.skeleton-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        transparent 100%
    );
    animation: shimmer 2s infinite ease-in-out;
    animation-delay: 0.5s;
}

/* Loading Title Skeleton */
.skeleton-title {
    width: 140px;
    height: 12px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.skeleton-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        transparent 100%
    );
    animation: shimmer 2s infinite ease-in-out;
    animation-delay: 0.3s;
}

/* Responsive adjustments for loading */
@media (max-width: 768px) {
    .skeleton-item {
        padding: 5px 10px;
        margin-bottom: 6px;
    }
    
    .skeleton-radio {
        width: 12px;
        height: 12px;
        margin-right: 6px;
    }
    
    .skeleton-text {
        height: 10px;
    }
    
    .skeleton-icon {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .traffic-selector-loading {
        padding: 10px;
    }
    
    .skeleton-item {
        padding: 4px 8px;
        margin-bottom: 5px;
    }
    
    .skeleton-button {
        height: 25px;
        margin: 10px 0;
    }
}

/* Feature Tooltip Styles */
.feature-tooltip {
    margin-left: 8px;
    color: #6c757d !important;
    font-size: 14px !important;
    cursor: help;
    transition: color 0.2s ease;
    opacity: 0.7 !important;
    display: inline-block !important;
    visibility: visible !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.feature-tooltip:hover {
    color: #0066cc !important;
    opacity: 1 !important;
}

.featureList li .feature-tooltip {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    margin-right: 8px;
    display: inline-block !important;
    visibility: visible !important;
}

/* Ensure FontAwesome icons are properly displayed for features */
.featureList .feature-tooltip.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    visibility: visible !important;
}

.featureList .feature-tooltip.fas:before {
    content: "\f05a" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    visibility: visible !important;
}

/* Traffic Tooltip Styles */
.traffic-tooltip {
    margin-left: 6px;
    color: #6c757d;
    font-size: 12px;
    cursor: help;
    transition: color 0.2s ease;
    opacity: 0.6;
    vertical-align: middle;
}

.traffic-tooltip:hover {
    color: #007bff;
    opacity: 1;
}

/* Traffic tooltip positioning - target the tooltip-custom wrapper */
.priceInfoArea.selector ul li label .val .tooltip-custom {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
}

/* Ensure proper positioning for traffic tooltips in mobile */
@media (max-width: 768px) {
    .priceInfoArea.selector ul li label .val .tooltip-custom {
        right: 8px !important;
    }
}

/* Style the icon inside tooltip-custom wrapper */
.priceInfoArea.selector ul li label .val .tooltip-custom .traffic-tooltip {
    position: static !important;
    margin: 0 !important;
    font-size: 14px !important;
    color: #6c757d !important;
    opacity: 0.7 !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

.priceInfoArea.selector ul li label .val .tooltip-custom .traffic-tooltip:hover {
    color: #007bff !important;
    opacity: 1 !important;
}

/* Ensure FontAwesome icons are loaded and visible */
.traffic-tooltip.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    visibility: visible !important;
}

/* Force FontAwesome icon visibility with stronger selectors */
.priceInfoArea .tooltip-custom .traffic-tooltip.fas,
.priceInfoArea .traffic-tooltip.fas,
i.fas.traffic-tooltip {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
    color: #6c757d !important;
    font-size: 14px !important;
    content: "\f05a" !important; /* FontAwesome info-circle */
}

/* Ensure icon pseudo-element is shown */
.priceInfoArea .traffic-tooltip.fas:before,
i.fas.traffic-tooltip:before {
    content: "\f05a" !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
    visibility: visible !important;
}

/* Additional specificity for traffic tooltips */
.priceInfoArea ul li .traffic-tooltip {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
    font-size: 14px !important;
}

/* Hover state for traffic tooltips */
.priceInfoArea ul li:hover .traffic-tooltip,
.priceInfoArea ul li label:hover .traffic-tooltip {
    opacity: 1 !important;
    color: #007bff !important;
}

/* Fix for tooltip text positioning within custom wrapper */
.priceInfoArea .tooltip-custom .tooltip-text {
    position: absolute;
    bottom: 125%;
    right: 0;
    left: auto;
    margin-left: 0;
    margin-right: -100px;
    width: 280px;
}

/* Override specific positioning for traffic tooltips */
.priceInfoArea.selector .tooltip-custom .tooltip-text {
    bottom: 150%;
    right: -100px;
    left: auto;
    margin-left: 0;
    margin-right: 0;
    width: 280px;
    pointer-events: none;
}

/* Show traffic tooltip on hover */
.priceInfoArea.selector .tooltip-custom:hover .tooltip-text {
    pointer-events: auto;
}

.prodPackage .purchaseInfo .priceInfoArea.selector ul li input[type="radio"]:checked ~ label {
    border-color: #007bff !important;
    background: #e7f3ff !important;
    box-shadow: 0 2px 8px rgba(0,123,255,0.25) !important;
}

/* Tooltip custom wrapper final positioning */
.priceInfoArea.selector ul li label .val .tooltip-custom {
    display: inline-block !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1000 !important;
}

/* Disable default browser tooltips globally */
.feature-tooltip:hover::after,
.traffic-tooltip:hover::after,
.feature-tooltip[title]:hover::after,
.traffic-tooltip[title]:hover::after {
    content: none !important;
    display: none !important;
}

/* Override browser default tooltip behavior */
.feature-tooltip,
.traffic-tooltip {
    position: relative;
}

.feature-tooltip::before,
.traffic-tooltip::before {
    content: attr(title);
    display: none !important;
}

/* Custom Tooltip Styles */
.tooltip-custom {
    position: relative;
    display: inline-block;
    z-index: 1;
}

/* Ensure tooltip wrapper is always visible */
.priceInfoArea .tooltip-custom,
.featureList .tooltip-custom {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure tooltip icons are always visible and properly styled */
.priceInfoArea .tooltip-custom .traffic-tooltip,
.featureList .tooltip-custom .feature-tooltip {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
    color: #6c757d !important;
    font-size: 14px !important;
    margin-left: 0 !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.priceInfoArea .tooltip-custom .traffic-tooltip:hover,
.featureList .tooltip-custom .feature-tooltip:hover {
    opacity: 1 !important;
    color: #007bff !important;
}

/* Force feature tooltip icons to be visible even without wrapper */
.featureList li i.feature-tooltip {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
    color: #6c757d !important;
    font-size: 14px !important;
    margin-left: 8px !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    flex-shrink: 0 !important;
}

.featureList li i.feature-tooltip:hover {
    opacity: 1 !important;
    color: #007bff !important;
}

.tooltip-custom .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 320px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    position: absolute;
    z-index: 9999;
    bottom: 125%;
    left: 50%;
    margin-left: -160px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #444;
    pointer-events: none;
}

.tooltip-custom .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip-custom:hover .tooltip-text {
    pointer-events: auto;
}

/* Traffic Selector Initial Display Fix */
.priceInfoArea.selector .monthly,
.priceInfoArea.selector .yearly {
    display: none;
    transition: opacity 0.3s ease;
}

/* Loaded class only enables visibility, actual display control via JavaScript */
.priceInfoArea.selector .monthly.loaded,
.priceInfoArea.selector .yearly.loaded {
    opacity: 1;
    /* Don't set display here - let JavaScript handle it */
}

/* Hide traffic selector elements until loading completes */
.priceInfoArea.selector ul {
    display: none;
    visibility: hidden;
    transition: all 0.3s ease;
}

.priceInfoArea.selector ul.loaded {
    display: flex !important;
    visibility: visible;
}

/* Hide free trial buttons initially */
.freeTrialBtn {
    display: none;
    transition: all 0.3s ease;
}

.freeTrialBtn.loaded {
    display: block;
}

/* Responsive tooltip positioning */
@media (max-width: 768px) {
    .tooltip-custom .tooltip-text {
        width: 280px;
        margin-left: -140px;
        font-size: 12px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .tooltip-custom .tooltip-text {
        width: 250px;
        margin-left: -125px;
        left: 50%;
        right: auto;
    }
} 