/**
 * Frontend Calculator CSS
 */

.ezirepair-calculator {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.calculator-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* Step headers */
.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.back-button:hover {
    background: #e0e0e1;
    border-color: #a0a0a1;
}

.step-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    color: #0f2684;
}

.step-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0f2684;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Error message */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #d63638;
}

.error-message .button {
    margin-top: 15px;
}

/* Search box */
.search-box {
    position: relative;
    margin-bottom: 30px;
}

.device-search-input {
    width: 100%;
    padding: 15px 45px 15px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.device-search-input:focus {
    outline: none;
    border-color: #0f2684;
}

.search-box .dashicons {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Brands grid */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.brand-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e1;
    border-radius: 8px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.brand-item:hover {
    background: #0f2684;
    border-color: #0f2684;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 38, 132, 0.2);
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.brand-count {
    font-size: 14px;
    opacity: 0.7;
}

/* Devices grid */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.device-item {
    background: #fff;
    border: 2px solid #e0e0e1;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.device-item:hover {
    background: #f8f9fa;
    border-color: #0f2684;
    transform: translateX(5px);
}

.device-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Repairs list */
.repairs-list {
    margin-bottom: 30px;
}

.repair-item {
    border: 2px solid #e0e0e1;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.repair-item:hover {
    border-color: #0f2684;
    background: #f8f9fa;
}

.repair-label {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    margin: 0;
}

.repair-checkbox {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    cursor: pointer;
}

.repair-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.repair-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.repair-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
}

.repair-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.repair-price {
    font-size: 18px;
    font-weight: 700;
    color: #0f2684;
}

/* Cart summary */
.cart-summary {
    background: #f8f9fa;
    border: 2px solid #0f2684;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.cart-summary h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #0f2684;
}

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

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cart-item-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #0f2684;
}

.remove-cart-item {
    background: #d63638;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.remove-cart-item:hover {
    background: #b32d2e;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid #ddd;
    margin-top: 10px;
    font-size: 20px;
    font-weight: 700;
}

.total-amount {
    color: #0f2684;
    font-size: 28px;
}

.proceed-checkout {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: 600;
    background: #0f2684;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 20px;
}

.proceed-checkout:hover {
    background: #0a1a5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 38, 132, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-container {
        padding: 20px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .step-title {
        font-size: 22px;
    }
}

