/* Solar Quote Calculator Styles */
.sqc-calculator-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sqc-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    border-radius: 8px;
}

.sqc-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.sqc-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

/* Form Layout */
.sqc-form {
    display: block;
}

.sqc-section {
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.sqc-section h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 600;
    color: #2e7d32;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 10px;
}

.sqc-subsection {
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
}

.sqc-subsection h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Grid System */
.sqc-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.sqc-col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 10px;
    margin-bottom: 15px;
}

.sqc-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .sqc-col-4,
    .sqc-col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Form Elements */
.sqc-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.sqc-form input[type="text"],
.sqc-form input[type="tel"],
.sqc-form input[type="email"],
.sqc-form input[type="number"],
.sqc-form select,
.sqc-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.sqc-form input:focus,
.sqc-form select:focus,
.sqc-form textarea:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Product Search */
.sqc-product-search {
    position: relative;
    margin-bottom: 15px;
}

.sqc-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.sqc-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.sqc-search-dropdown {
    padding: 0;
}

.sqc-product-result {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sqc-product-result:hover {
    background-color: #f5f5f5;
}

.sqc-product-result:last-child {
    border-bottom: none;
}

.sqc-result-image {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.sqc-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sqc-no-image {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #999;
}

.sqc-result-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.sqc-result-price {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
}

.sqc-result-origin {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.sqc-no-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Selected Products */
.sqc-selected-products {
    margin-top: 15px;
}

.sqc-selected-product {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.sqc-product-row {
    display: grid;
    grid-template-columns: 3fr 80px 100px 120px 120px 2fr 50px;
    align-items: center;
    padding: 15px;
    gap: 15px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .sqc-product-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .sqc-product-col {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .sqc-product-col:last-child {
        border-bottom: none;
    }
    
    .sqc-product-col:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
    }
}

.sqc-product-name {
    text-align: left;
}

.sqc-product-name strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.sqc-product-name p {
    margin: 0 0 3px 0;
    color: #666;
    font-size: 12px;
}

.sqc-product-name small {
    color: #999;
    font-size: 11px;
}

.sqc-product-qty {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.sqc-product-price,
.sqc-product-total {
    font-weight: 600;
    color: #2e7d32;
}

.sqc-remove-product {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background-color 0.2s ease;
}

.sqc-remove-product:hover {
    background: #d32f2f;
}

/* Section Totals */
.sqc-section-total {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e8;
    border-radius: 6px;
    text-align: right;
    font-size: 16px;
    color: #2e7d32;
}

/* Grand Total */
.sqc-grand-total {
    background: #2e7d32;
    color: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

.sqc-grand-total h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
}

.sqc-total-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
    font-size: 14px;
}

.sqc-breakdown-item span {
    font-weight: 600;
}

.sqc-breakdown-item ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.sqc-breakdown-item li {
    margin-bottom: 3px;
}

/* Buttons */
.sqc-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.sqc-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 140px;
}

.sqc-btn-primary {
    background: #4caf50;
    color: white;
}

.sqc-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.sqc-btn-secondary {
    background: #2196f3;
    color: white;
}

.sqc-btn-secondary:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.sqc-btn-outline {
    background: transparent;
    color: #4caf50;
    border: 2px solid #4caf50;
}

.sqc-btn-outline:hover {
    background: #4caf50;
    color: white;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .sqc-actions {
        flex-direction: column;
    }
    
    .sqc-btn {
        width: 100%;
    }
}

/* Modal */
.sqc-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.sqc-modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 8px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

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

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

.sqc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

.sqc-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.sqc-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
}

.sqc-modal-close:hover {
    color: #333;
}

.sqc-modal-body {
    padding: 25px;
}

.sqc-product-details {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 768px) {
    .sqc-product-details {
        grid-template-columns: 1fr;
    }
}

.sqc-product-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.sqc-product-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sqc-product-info p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.sqc-product-specs {
    margin: 15px 0;
}

.sqc-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sqc-spec-item:last-child {
    border-bottom: none;
}

.sqc-spec-label {
    font-weight: 600;
    color: #333;
}

.sqc-spec-value {
    color: #666;
    text-align: right;
}

.sqc-quantity-selector {
    margin-top: 20px;
}

.sqc-quantity-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.sqc-quantity-selector input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    text-align: center;
}

.sqc-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    background: #f5f5f5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 8px 8px;
}

/* Loading */
.sqc-loading {
    text-align: center;
    padding: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    margin: 20px 0;
}

.sqc-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.sqc-spinner-small {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notifications */
.sqc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.sqc-notification-success {
    background: #4caf50;
}

.sqc-notification-error {
    background: #f44336;
}

.sqc-notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    line-height: 1;
}

/* Customer Info Section */
.sqc-customer-info {
    background: #f8f9fa;
    border-left: 4px solid #007bff;
}

.sqc-customer-info h3 {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sqc-calculator-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .sqc-header h2 {
        font-size: 22px;
    }
    
    .sqc-section {
        padding: 15px;
    }
    
    .sqc-subsection {
        padding: 10px;
    }
    
    .sqc-modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    
    .sqc-grand-total h3 {
        font-size: 20px;
    }
    
    .sqc-total-breakdown {
        grid-template-columns: 1fr;
    }
}