/* Dual Pricing Plugin Frontend Styles */

/* Wrapper */
.dual-pricing-wrapper {
    display: flex;
    gap: 10px;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

/* Pricing Options */
.pricing-option {
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    /* Fixed: Không cắt nội dung */
}

/* Selected checkmark (after) */
.pricing-option.selected:after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    background: none;
    margin: -2px 0 0 2px;
    border-radius: 0;
    position: absolute;
    right: 7px;
    top: 7px;
    z-index: 1;
}

/* Selected corner ribbon (before) */
.pricing-option.selected:before {
    content: '';
    width: 0;
    height: 0;
    border-top: 40px solid #d70018;
    border-left: 40px solid transparent;
    position: absolute;
    right: -1px;
    top: -1px;
    z-index: 1;
    border-top-right-radius: 8px;
}

/* Width distribution: Online 40%, Installation 60% */
.pricing-option.online {
    flex: 0 0 calc(40% - 5px);
    max-width: calc(40% - 5px);
}

.pricing-option.installation {
    flex: 0 0 calc(60% - 5px);
    max-width: calc(60% - 5px);
}

/* Hover state */
.pricing-option:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Selected states */
.pricing-option.selected {
    border-color: #007cba;
    background-color: #f0f8ff;
}

.pricing-option.installation.selected {
    border-color: #ff6b35;
    background-color: #ff6b350d;
}

/* Hide radio button */
.pricing-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

/* Header */
.pricing-header {
    background: #007cba;
    color: white;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.pricing-option.installation .pricing-header {
    background: #ff6b35;
}

/* Price Wrapper */
.pricing-price-wrapper {
    margin: 15px 0;
    padding: 0 15px;
    line-height: 1.3;
    text-align: center;
}

/* Price Display */
.pricing-price {
    font-size: 22px;
    font-weight: bold;
    color: #d70018;
}

.pricing-regular-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.pricing-discount-badge {
    display: inline-block;
    background: #ff6b35;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    vertical-align: middle;
}

/* Features List */
.pricing-features {
    list-style: none;
    margin: 15px 0;
    padding: 0 15px;
}

.pricing-features li {
    padding: 0 0 0 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.3;
    margin: 0 0 5px 0 !important;
}

.pricing-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .dual-pricing-wrapper {
        flex-direction: row;
    }

    .pricing-option.online,
    .pricing-option.installation {
        flex: 0 0 100%;
        max-width: 100%;
    }
}