/**
 * Public Stylesheet
 *
 * @package    Handyman_Quote_Pro
 * @subpackage Handyman_Quote_Pro/assets/css
 */

/* ========== Form Container ========== */
.hqp-form-container {
    max-width: 800px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.hqp-form-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    color: #333;
}

/* ========== Form Styles ========== */
.hqp-quote-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Modern Style */
.hqp-style-modern .hqp-form-section {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.hqp-style-modern .hqp-form-section:last-child {
    border-bottom: none;
}

.hqp-section-title {
    font-size: 24px;
    color: #333;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #0073aa;
}

/* ========== Form Fields ========== */
.hqp-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.hqp-form-group {
    margin-bottom: 20px;
}

.hqp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.hqp-required {
    color: #d63638;
}

.hqp-input,
.hqp-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.hqp-input:focus,
.hqp-textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.hqp-textarea {
    resize: vertical;
    font-family: inherit;
}

/* ========== Services Grid ========== */
.hqp-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.hqp-service-box {
    display: block;
    cursor: pointer;
    padding: 20px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.hqp-service-box:hover {
    border-color: #0073aa;
    background: #f0f8ff;
    transform: translateY(-2px);
}

.hqp-service-box input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.hqp-service-box input[type="checkbox"]:checked ~ .hqp-service-icon,
.hqp-service-box input[type="checkbox"]:checked ~ .hqp-service-label {
    color: #0073aa;
}

.hqp-service-box input[type="checkbox"]:checked {
    & ~ .hqp-service-box {
        background: #0073aa;
        border-color: #0073aa;
    }
}

.hqp-service-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
    line-height: 1;
}

.hqp-service-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    display: block;
}

.hqp-service-checkbox:has(input:checked) {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.hqp-service-checkbox:has(input:checked) .hqp-service-icon,
.hqp-service-checkbox:has(input:checked) .hqp-service-label {
    color: #fff;
}

/* ========== Subcategories ========== */
#hqp-subcategories-content {
    display: grid;
    gap: 20px;
}

.hqp-subcategory-group {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
}

.hqp-subcategory-group h4 {
    margin: 0 0 15px 0;
    color: #0073aa;
}

.hqp-subcategory-item {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hqp-subcategory-item label {
    flex: 1;
    cursor: pointer;
}

.hqp-subcategory-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.hqp-subcategory-item input[type="number"] {
    width: 120px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* ========== Estimate Display ========== */
.hqp-estimate-box {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.hqp-estimate-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #fff;
}

.hqp-estimate-amount {
    font-size: 48px;
    font-weight: bold;
    margin: 10px 0;
}

.hqp-estimate-note {
    font-size: 14px;
    opacity: 0.9;
    margin: 15px 0 0 0;
}

/* ========== File Upload ========== */
.hqp-file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hqp-file-input:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.hqp-help-text {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

/* ========== Messages ========== */
.hqp-form-messages {
    padding: 15px 20px;
    border-radius: 6px;
    margin: 20px 30px;
    animation: slideDown 0.3s ease;
}

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

.hqp-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hqp-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hqp-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ========== Submit Button ========== */
.hqp-form-actions {
    padding: 30px;
    background: #f9f9f9;
    text-align: center;
}

.hqp-submit-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.hqp-submit-btn:hover:not(:disabled) {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,115,170,0.3);
}

.hqp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.hqp-btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hqp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ========== Classic Style ========== */
.hqp-style-classic .hqp-quote-form {
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.hqp-style-classic .hqp-form-section {
    padding: 20px;
    background: #fff;
    margin: 15px;
    border-radius: 4px;
}

.hqp-style-classic .hqp-section-title {
    border-bottom: 2px solid #333;
}

/* ========== Minimal Style ========== */
.hqp-style-minimal .hqp-quote-form {
    background: transparent;
    box-shadow: none;
}

.hqp-style-minimal .hqp-form-section {
    padding: 20px 0;
}

.hqp-style-minimal .hqp-section-title {
    border-bottom: 1px solid #ddd;
    font-weight: 300;
}

.hqp-style-minimal .hqp-input,
.hqp-style-minimal .hqp-textarea {
    border-radius: 0;
    border-width: 0 0 2px 0;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hqp-form-container {
        margin: 20px;
    }

    .hqp-form-row {
        grid-template-columns: 1fr;
    }

    .hqp-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hqp-section-title {
        font-size: 20px;
    }

    .hqp-estimate-amount {
        font-size: 36px;
    }

    .hqp-submit-btn {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hqp-services-grid {
        grid-template-columns: 1fr;
    }

    .hqp-service-icon {
        font-size: 30px;
    }

    .hqp-style-modern .hqp-form-section {
        padding: 20px 15px;
    }
}

/* ========== reCAPTCHA Notice ========== */
.hqp-recaptcha-notice {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
    text-align: center;
    line-height: 1.6;
}

.hqp-recaptcha-notice a {
    color: #0073aa;
    text-decoration: none;
}

.hqp-recaptcha-notice a:hover {
    text-decoration: underline;
}

/* ========== Accessibility ========== */
.hqp-input:focus-visible,
.hqp-textarea:focus-visible,
.hqp-submit-btn:focus-visible {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.hqp-service-box:focus-within {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

/* ========== Loading State ========== */
.hqp-loading .hqp-submit-btn {
    pointer-events: none;
}

.hqp-loading .hqp-btn-text {
    display: none;
}

.hqp-loading .hqp-btn-loader {
    display: inline-flex;
}

