/**
 * FluentCart Advanced Bricks Elements - Styles
 *
 * @package Chrmrtns\FluentCartBricks
 * @since 1.0.0
 */

/* ====================
   COMMON ELEMENT STYLES
   ==================== */

.chrmtns-fcba-element {
    box-sizing: border-box;
}

.chrmtns-fcba-error {
    padding: 20px;
    background: #fee;
    border: 1px solid #f00;
    border-radius: 4px;
    color: #c00;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ====================
   ADD TO CART ELEMENT
   ==================== */

.chrmtns-fcba-add-to-cart {
    display: inline-block;
}

.chrmtns-fcba-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #4A90E2;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chrmtns-fcba-button:hover {
    background-color: #357ABD;
    transform: translateY(-1px);
}

.chrmtns-fcba-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chrmtns-fcba-icon {
    display: inline-flex;
    align-items: center;
}

/* ====================
   CART DRAWER ELEMENT
   ==================== */

.chrmtns-fcba-cart-drawer {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chrmtns-fcba-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.chrmtns-fcba-cart-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.chrmtns-fcba-cart-count {
    font-size: 14px;
    color: #666;
}

.chrmtns-fcba-cart-items {
    margin-bottom: 20px;
}

.chrmtns-fcba-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.chrmtns-fcba-item-name {
    flex: 1;
    font-weight: 500;
}

.chrmtns-fcba-item-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chrmtns-fcba-empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.chrmtns-fcba-cart-footer {
    border-top: 2px solid #e0e0e0;
    padding-top: 15px;
}

.chrmtns-fcba-cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.chrmtns-fcba-checkout-button {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: #4A90E2;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.chrmtns-fcba-checkout-button:hover {
    background-color: #357ABD;
}

/* ====================
   MINI CART WIDGET
   ==================== */

.chrmtns-fcba-mini-cart {
    display: inline-block;
}

.chrmtns-fcba-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.chrmtns-fcba-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: 24px;
}

.chrmtns-fcba-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: #e74c3c;
    color: #ffffff;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

/* ====================
   CHECKOUT FORM
   ==================== */

.chrmtns-fcba-checkout-form {
    max-width: 800px;
}

.chrmtns-fcba-layout-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chrmtns-fcba-section {
    margin-bottom: 30px;
}

.chrmtns-fcba-section-heading {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.chrmtns-fcba-field {
    margin-bottom: 15px;
}

.chrmtns-fcba-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.chrmtns-fcba-field input,
.chrmtns-fcba-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.chrmtns-fcba-field input:focus,
.chrmtns-fcba-field select:focus {
    outline: none;
    border-color: #4A90E2;
}

/* ====================
   ORDER SUMMARY
   ==================== */

.chrmtns-fcba-order-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.chrmtns-fcba-summary-heading {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.chrmtns-fcba-summary-items {
    margin-bottom: 20px;
}

.chrmtns-fcba-summary-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.chrmtns-fcba-summary-totals {
    border-top: 2px solid #e0e0e0;
    padding-top: 15px;
}

.chrmtns-fcba-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.chrmtns-fcba-summary-total {
    font-size: 18px;
    font-weight: 600;
    border-top: 1px solid #e0e0e0;
    padding-top: 12px;
    margin-top: 8px;
}

/* ====================
   PRODUCT CARD
   ==================== */

.chrmtns-fcba-product-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.chrmtns-fcba-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.chrmtns-fcba-layout-horizontal {
    display: flex;
}

.chrmtns-fcba-layout-horizontal .chrmtns-fcba-product-image {
    flex: 0 0 40%;
}

.chrmtns-fcba-product-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.chrmtns-fcba-product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.chrmtns-fcba-product-content {
    padding: 20px;
}

.chrmtns-fcba-product-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.chrmtns-fcba-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #4A90E2;
    margin-bottom: 12px;
}

.chrmtns-fcba-product-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

.chrmtns-fcba-product-button {
    width: 100%;
    padding: 14px;
    background-color: #4A90E2;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chrmtns-fcba-product-button:hover {
    background-color: #357ABD;
}

.chrmtns-fcba-product-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ====================
   RESPONSIVE STYLES
   ==================== */

@media (max-width: 768px) {
    .chrmtns-fcba-layout-two-column {
        grid-template-columns: 1fr;
    }

    .chrmtns-fcba-layout-horizontal {
        flex-direction: column;
    }

    .chrmtns-fcba-layout-horizontal .chrmtns-fcba-product-image {
        flex: 0 0 auto;
    }

    .chrmtns-fcba-cart-drawer {
        padding: 15px;
    }
}
