/**
 * Custom Plugin Frontend Styles
 *
 * @since 1.0.0
 */

/* Price Cards Grid */
.custom-price-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .custom-price-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .custom-price-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Individual Price Card */
.custom-price-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.custom-price-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Product Header */
.custom-price-card .product-header {
    margin-bottom: 16px;
    text-align: center;
}

.custom-price-card .product-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #333333;
    line-height: 1.3;
}

.custom-price-card .product-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.custom-price-card .product-tag {
    background: #f8f9fa;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-price-card .product-tag:first-child {
    background: #28a745;
    color: white;
}

/* Product Description */
.custom-price-card .product-description {
    margin-bottom: 20px;
    color: #666666;
    line-height: 1.6;
    text-align: center;
}

.custom-price-card .product-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-price-card .product-description li {
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
}

.custom-price-card .product-description li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Product Pricing */
.custom-price-card .product-pricing {
    margin-bottom: 20px;
    text-align: center;
}

.custom-price-card .pricing-selector select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.custom-price-card .pricing-selector select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Configuration Options */
.custom-price-card .product-config-options {
    margin-bottom: 20px;
}

.custom-price-card .config-option {
    margin-bottom: 12px;
}

.custom-price-card .config-option label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.custom-price-card .config-option select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

/* Freebie Products */
.custom-price-card .product-freebies {
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.custom-price-card .product-freebies h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #28a745;
    font-weight: 600;
}

.custom-price-card .freebie-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-price-card .freebie-list li {
    padding: 2px 0;
    font-size: 14px;
    color: #666;
}

/* Order Button */
.custom-price-card .product-actions {
    text-align: center;
}

.custom-price-card .order-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.custom-price-card .order-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.custom-price-card .order-button:active {
    transform: translateY(0);
}

.custom-price-card .order-button i {
    font-size: 14px;
}

/* Error and Empty States */
.custom-price-cards-error,
.custom-price-cards-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.custom-price-cards-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

.custom-price-cards-empty {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

/* Loading States */
.custom-price-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.custom-price-card.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Improvements */
@media (max-width: 480px) {
    .custom-price-card {
        padding: 16px;
    }

    .custom-price-card .product-title {
        font-size: 20px;
    }

    .custom-price-card .order-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .custom-price-card {
        background: #2c2c2c;
        border-color: #444;
        color: #fff;
    }

    .custom-price-card .product-title {
        color: #fff;
    }

    .custom-price-card .product-description {
        color: #ccc;
    }

    .custom-price-card .product-freebies {
        background: #333;
    }

    .custom-price-card .config-option select,
    .custom-price-card .pricing-selector select {
        background: #333;
        color: #fff;
        border-color: #555;
    }
}