/* Theme Fixes and Improvements */

/* Fix button alignment and styling */
.pricing-card .btn-outline,
.pricing-card .btn-primary,
.pricing-card button {
    width: 100%;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    margin-top: auto;
    display: block;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #0073aa;
    border: 2px solid #0073aa;
    border-radius: 8px;
}

.pricing-card .btn-outline:hover,
.pricing-card .btn-primary:hover,
.pricing-card button:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Selected card button stands out */
.pricing-card.selected .btn-outline,
.pricing-card.selected .btn-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
    box-shadow: 0 4px 15px rgba(0,115,170,0.3);
}

.pricing-card.selected .btn-outline:hover,
.pricing-card.selected .btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,115,170,0.4);
}

/* Ensure pricing cards have equal height */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.pricing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 650px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid #999;
    border-radius: 16px;
    padding: 30px;
    background: white;
    position: relative;
}

.pricing-card .pricing-features {
    flex-grow: 1;
    margin-bottom: 30px;
}

/* Pricing card hover state */
.pricing-card:hover {
    border-color: #999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* Pricing card selection state */
.pricing-card.selected {
    border: 3px solid #0073aa;
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,115,170,0.2);
    background: white;
}

.pricing-card.selected .pricing-header {
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    margin: -30px -30px 30px;
    padding: 40px 30px 30px;
    border-radius: 14px 14px 0 0;
}

/* Fix issue selection boxes */
.issue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.issue-box {
    padding: 20px;
    border: 2px solid #999;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.issue-box input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.issue-box:hover {
    border-color: #666;
    background: #f8fbff;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.issue-box.selected {
    border-color: var(--wp-blue);
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.issue-box.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--wp-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Urgency selection styling */
.urgency-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.urgency-option {
    padding: 20px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.urgency-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.urgency-option:hover {
    background: #f8fbff;
}

.urgency-option.selected {
    border: 2px solid var(--wp-blue);
    background: white;
    box-shadow: 0 4px 12px rgba(0,115,170,0.15);
}

.urgency-option .urgency-label {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.urgency-option .urgency-time {
    font-size: 14px;
    color: #666;
}

.urgency-option.emergency .urgency-label {
    color: #ff0000;
    text-transform: uppercase;
    font-weight: 700;
}

/* Form step improvements */
.form-step {
    animation: fadeIn 0.5s ease;
}

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

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

.form-navigation button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-prev {
    background: #f3f4f6;
    color: #333;
    border: 1px solid #e5e7eb;
}

.btn-next {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-prev:hover {
    background: #e5e7eb;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,115,170,0.3);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .issue-grid {
        grid-template-columns: 1fr;
    }
    
    .urgency-options {
        grid-template-columns: 1fr;
    }
    
    .pricing-card {
        min-height: auto;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .form-navigation button {
        width: 100%;
    }
}

/* Fix header button alignment */
.header-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-cta .btn-primary {
    white-space: nowrap;
    padding: 10px 24px;
}

/* Trust indicators alignment */
.trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.trust-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading state for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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