
/**
 * Frontend Calculator Styles
 * 
 * @package Waad_Price_Calculator
 * @since 1.0.0
 */

/* Import Google Fonts - Almarai */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&display=swap');

/* CSS Variables */
:root {
    --brand-dark: #1C1C1D;
    --brand-gold: #CAA05C;
    --brand-light: #F6F6F6;
    --success-green: #25D366;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 22px rgba(28, 28, 29, 0.06);
    --transition: 0.15s ease;
}

/* Container */
.waad-calculator-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    padding: 0 15px;
    font-family: 'Almarai', sans-serif;
    direction: rtl;
}

/* Main Card */
.waad-calculator-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    position: relative;
}

/* Title */
.waad-calculator-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.waad-calculator-title svg {
    color: var(--brand-gold);
}

/* Form Section */
.waad-form-section {
    margin-bottom: 25px;
}

.waad-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-light);
}

/* Form Group */
.waad-form-group {
    margin-bottom: 18px;
}

.waad-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 8px;
}

.waad-label svg {
    color: var(--brand-gold);
}

.waad-required {
    color: #e74c3c;
}

/* Input Fields */
.waad-input,
.waad-select {
    width: 100%;
    padding: 12px 15px;
    font-family: 'Almarai', sans-serif;
    font-size: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: var(--brand-dark);
    transition: var(--transition);
}

.waad-input:focus,
.waad-select:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(202, 160, 92, 0.1);
}

.waad-input::placeholder {
    color: #999;
}

/* Products Container */
.waad-products-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

/* Product Row */
.waad-product-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 15px;
    background: var(--brand-light);
    border-radius: 8px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.waad-product-select {
    grid-column: span 3;
}

.waad-product-quantity {
    width: 100%;
}

/* Remove Button */
.waad-remove-product {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.waad-remove-product:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.waad-remove-product svg {
    width: 18px;
    height: 18px;
}

/* Buttons */
.waad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: 'Almarai', sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.waad-btn-primary {
    width: 100%;
    background: var(--brand-gold);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.waad-btn-primary:hover {
    background: #b89450;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.waad-btn-secondary {
    background: #fff;
    color: var(--brand-dark);
    border: 2px solid #e0e0e0;
}

.waad-btn-secondary:hover {
    background: var(--brand-light);
    border-color: var(--brand-gold);
}

.waad-btn-whatsapp {
    width: 100%;
    background: var(--success-green);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.waad-btn-whatsapp:hover {
    background: #1fbd59;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Results Section */
.waad-results-section {
    margin-top: 25px;
    padding: 25px;
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
    border-radius: var(--border-radius);
    border: 2px solid var(--brand-gold);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.waad-results-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 18px;
    text-align: center;
}

.waad-results-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.waad-result-item {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.waad-result-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.waad-result-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-gold);
}

/* Loading Overlay */
.waad-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.waad-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--brand-light);
    border-top-color: var(--brand-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.waad-loading-overlay p {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .waad-calculator-card {
        padding: 20px;
    }

    .waad-calculator-title {
        font-size: 20px;
    }

    .waad-product-row {
        grid-template-columns: 1fr;
    }

    .waad-product-select {
        grid-column: span 1;
    }

    .waad-results-content {
        grid-template-columns: 1fr;
    }

    .waad-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .waad-calculator-container {
        margin: 15px auto;
        padding: 0 10px;
    }

    .waad-calculator-card {
        padding: 15px;
    }

    .waad-calculator-title {
        font-size: 18px;
    }

    .waad-section-title {
        font-size: 16px;
    }

    .waad-result-value {
        font-size: 20px;
    }
}
