/**
 * WP CleanQuote Enhanced Styles
 */

:root {
    --cq-primary: #2b9d90;
    --cq-primary-hover: #23857a;
    --cq-bg: #ffffff;
    --cq-text: #1f2937;
    --cq-text-light: #6b7280;
    --cq-border: #e5e7eb;
    --cq-success: #10b981;
    --cq-error: #ef4444;
    --cq-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.cleanquote-form-wrapper {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 16px;
    background: var(--cq-bg);
    box-shadow: var(--cq-shadow);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--cq-text);
    line-height: 1.5;
}

/* Progress Bar */
.cq-progress-container {
    margin-bottom: 40px;
}

.cq-progress-bar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    position: relative;
    margin-bottom: 20px;
    padding: 0;
    list-style: none;
}

.cq-progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--cq-border);
    z-index: 1;
    transform: translateY(-50%);
    border-radius: 2px;
}

.cq-progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cq-bg);
    border: 3px solid var(--cq-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.cq-progress-step.active {
    border-color: var(--cq-primary);
    color: var(--cq-primary);
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(43, 157, 144, 0.15);
}

.cq-progress-step.completed {
    background: var(--cq-primary);
    border-color: var(--cq-primary);
    color: white;
}

/* Form Elements */
.cleanquote-step h3 {
    font-size: 1.75rem;
    margin-bottom: 24px;
    color: #111827;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--cq-border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
    background-color: #f9fafb;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cq-primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(43, 157, 144, 0.1);
}

/* Buttons */
.cq-button-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

button {
    padding: 14px 28px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.cq-btn-primary {
    background: var(--cq-primary);
    color: white;
}

.cq-btn-primary:hover {
    background: var(--cq-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cq-btn-primary:active {
    transform: translateY(0);
}

.cq-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.cq-btn-secondary {
    background: white;
    color: var(--cq-text);
    border: 2px solid var(--cq-border);
}

.cq-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Price Preview */
#cq-price-preview {
    background: #f0fdfa;
    border: 2px solid #ccfbf1;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    margin-top: 32px;
    animation: slideUp 0.4s ease-out;
}

#cq-total-price {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--cq-primary);
    margin-top: 8px;
}

/* Add-ons Grid */
.cq-addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.cq-addon-item {
    border: 2px solid var(--cq-border);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cq-addon-item:hover {
    border-color: var(--cq-primary);
    background: #fff;
}

.cq-addon-item.selected {
    background: #f0fdfa;
    border-color: var(--cq-primary);
    box-shadow: 0 0 0 4px rgba(43, 157, 144, 0.1);
}

.cq-addon-item span {
    font-weight: 700;
    color: var(--cq-text);
}

.cq-addon-item small {
    color: var(--cq-primary);
    font-weight: 600;
}

/* Success Message */
.cq-success-final {
    text-align: center;
    padding: 40px 20px;
}

.cq-success-final h3 {
    color: var(--cq-success);
    margin-bottom: 16px;
}

.cq-success-final p {
    color: var(--cq-text-light);
    font-size: 1.1rem;
}

/* Loading Spinner */
.cq-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    display: none !important;
}

.cq-spinner.show {
    display: inline-block !important;
}

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

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

/* Mobile Adjustments */
@media (max-width: 640px) {
    .cleanquote-form-wrapper {
        padding: 24px;
        margin: 20px 10px;
    }
    
    .cq-button-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}
