/* Poznet Bifrost Product - Frontend Styles */

/* Inline Bifrost price replacing default price */
.bifrost-custom-price {
    display: block;
}

.bifrost-price-gross {
    display: block;
    font-weight: 700;
}

.bifrost-price-net {
    display: block;
    font-size: 0.65em;
    color: #888;
    font-weight: 400;
}

/* Hide irrelevant elements when Bifrost price replaces default - product page */
.product-prices:has(.bifrost-custom-price) .product-discount,
.product-prices:has(.bifrost-custom-price) .discount,
.product-prices:has(.bifrost-custom-price) .product-without-taxes,
.product-prices:has(.bifrost-custom-price) .product-unit-price {
    display: none !important;
}

/* Hide irrelevant elements when Bifrost price replaces default - product listings */
.product-price-and-shipping:has(.bifrost-custom-price) .regular-price,
.product-price-and-shipping:has(.bifrost-custom-price) .discount-percentage,
.product-price-and-shipping:has(.bifrost-custom-price) .discount-amount {
    display: none !important;
}

/* Price block (displayed via displayProductPriceBlock hook) */
.bifrost-price-block {
    margin: 10px 0;
    padding: 12px 16px;
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-left: 4px solid #00ADEF;
    border-radius: 6px;
}

.bifrost-catalog-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.bifrost-price-label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.bifrost-price-value {
    font-size: 18px;
    font-weight: 700;
    color: #060735;
}

.bifrost-per-unit {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.bifrost-config-info {
    margin-top: 4px;
    color: #888;
}

.bifrost-config-info small {
    font-size: 11px;
}

.bifrost-inquiry-btn {
    margin-top: 10px;
    background-color: #00ADEF;
    border-color: #00ADEF;
    color: #fff;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    border: none;
}

.bifrost-inquiry-btn:hover {
    background-color: #0090c7;
    border-color: #0090c7;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 173, 239, 0.3);
}

/* Mode 1 - fallback (no price) */
.bifrost-mode-1 {
    background: #fff8e6;
    border-color: #ffd966;
    border-left-color: #f0ad4e;
}

.bifrost-mode-1 .bifrost-inquiry-btn {
    background-color: #060735;
    border-color: #060735;
}

.bifrost-mode-1 .bifrost-inquiry-btn:hover {
    background-color: #0a0b4d;
    box-shadow: 0 2px 8px rgba(6, 7, 53, 0.3);
}

/* Inquiry form (tab content) */
.bifrost-inquiry-container {
    max-width: 600px;
    padding: 20px 0;
}

.bifrost-inquiry-summary {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.bifrost-inquiry-summary h5 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #060735;
}

.bifrost-summary-table {
    width: 100%;
    font-size: 14px;
}

.bifrost-summary-table td {
    padding: 4px 0;
    vertical-align: top;
}

.bifrost-summary-table td:first-child {
    color: #666;
    width: 40%;
    padding-right: 10px;
}

.bifrost-form-group {
    margin-bottom: 15px;
}

.bifrost-form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.bifrost-form-group .required {
    color: #dc3545;
}

.bifrost-form-group .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.bifrost-form-group .form-control:focus {
    border-color: #00ADEF;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 173, 239, 0.15);
}

.bifrost-send-btn {
    background-color: #060735;
    border-color: #060735;
    color: #fff;
    font-weight: 600;
    padding: 10px 28px;
    font-size: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.bifrost-send-btn:hover {
    background-color: #00ADEF;
    border-color: #00ADEF;
}

.bifrost-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success message */
.bifrost-success-message {
    text-align: center;
    padding: 30px 20px;
}

.bifrost-success-message h4 {
    margin: 10px 0 5px;
    color: #060735;
}

.bifrost-success-message p {
    color: #666;
}

/* Error message */
.bifrost-error-message {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .bifrost-price-block {
        padding: 10px 12px;
    }

    .bifrost-price-value {
        font-size: 16px;
    }

    .bifrost-inquiry-container {
        max-width: 100%;
    }

    .bifrost-catalog-price {
        flex-direction: column;
        gap: 2px;
    }
}
