/**
 * BeaverTV Checkout CSS
 * Styles for the BeaverTV product configuration UI
 */

#beavertv-config-container {
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f8f9fa;
    margin: 20px 0;
}

#beavertv-config-container h3 {
    margin-top: 0;
    color: #2c5d98;
    font-size: 22px;
    margin-bottom: 15px;
}

#beavertv-config-container h4 {
    color: #2c5d98;
    font-size: 18px;
    margin-bottom: 8px;
}

#beavertv-config-container p {
    margin-bottom: 15px;
}

.select2-container {
    width: 100% !important;
}

.select2-container--classic .select2-selection--multiple {
    border-color: #ced4da;
    min-height: 100px;
}

#pick-count-display {
    font-weight: bold;
    text-align: center;
}

#addon-price-display, #pickpackage-price-display {
    color: #28a745;
    font-size: 16px;
}

#total-addons-price {
    font-weight: bold;
    font-size: 18px;
} 

/* Hide line items for addons */
#producttotal .clearfix {
    display: none;
}

#producttotal .summary-totals {
    border-top: 0 !important;
}

#producttotal .summary-list .list-item {
    display: none;
}

/* Channel Grid */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    margin-top: 15px;
}

.channel-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    position: relative;
    background: white;
    transition: all 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.channel-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.channel-item.selected {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.channel-logo {
    max-width: 100%;
    height: 50px;
    object-fit: contain;
    margin-bottom: 4px;
}

.channel-name {
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 2px;
    font-weight: bold;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.channel-price {
    font-size: 9px;
    color: #666;
}

.channel-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.channel-item.selected .channel-badge {
    opacity: 1;
    transform: scale(1);
}

/* Pick Package Cards */
.pickpackage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.pickpackage-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    position: relative;
    background: white;
    transition: all 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pickpackage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.pickpackage-card.selected {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.15);
}

.pickpackage-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #2c5d98;
}

.pickpackage-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.pickpackage-price {
    font-size: 22px;
    font-weight: bold;
    color: #28a745;
    margin: 10px 0;
}

.package-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.pickpackage-card.selected .package-badge {
    opacity: 1;
    transform: scale(1);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .pickpackage-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .pickpackage-name {
        font-size: 16px;
    }
    
    .pickpackage-subtitle {
        font-size: 12px;
    }
    
    .pickpackage-price {
        font-size: 18px;
    }
}

/* Validation Styles */
.validation-error {
    animation: highlight-error 1.5s ease;
    border: 2px solid #dc3545 !important;
    border-radius: 8px;
    padding: 15px !important;
}

/* Included Channels Styles */
#toggle-included-channels {
    transition: all 0.3s ease;
}

#included-channels-container {
    transition: all 0.3s ease;
    max-height: 600px;
    overflow-y: auto;
    margin-top: 10px;
}

.included-channel-item {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    line-height: 1.2;
    height: 100%;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.included-channel-item:hover {
    background-color: #e9f0f7;
    border-color: #c0d0e0;
}

.included-channel-item .channel-number {
    font-weight: bold;
    color: #2c5d98;
    min-width: 24px;
    display: inline-block;
}

.included-channel-item .channel-name {
    height: auto;
    font-weight: normal;
}

.included-channel-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.included-channel-logo.text-logo {
    background-color: #2c5d98;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.included-channel-item .channel-text {
    margin-left: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes highlight-error {
    0% { background-color: rgba(220, 53, 69, 0.1); }
    50% { background-color: rgba(220, 53, 69, 0.2); }
    100% { background-color: rgba(220, 53, 69, 0); }
}

/* Improve the alert appearance */
#pick-count-display.alert-danger {
    font-weight: bold;
    border-width: 2px;
}

/* Warning Indicators */
.needs-attention {
    border: 2px dashed #ffc107;
    border-radius: 8px;
    padding: 7px;
    position: relative;
}

.needs-attention::before {
    content: "Please complete this section";
    position: absolute;
    top: -10px;
    left: 20px;
    background-color: #fff;
    padding: 0 10px;
    color: #ffc107;
    font-weight: bold;
    font-size: 12px;
}

.warning-icon {
    color: #ffc107;
    animation: pulse 1.5s infinite;
}

.has-warning {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Button Validation Styles */
.validation-disabled {
    opacity: 0.65;
    cursor: not-allowed !important;
    transition: all 0.3s ease;
}

.validation-message {
    position: absolute;
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    white-space: nowrap;
}

.validation-message:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: #dc3545 transparent;
}

/* Hide configurable options */

#productConfigurableOptions {
    visibility: hidden;
    height: 0;
    overflow: hidden;
}

.sub-heading {
    display: none;
}