/**
 * Lead Program Styles
 * Styles for quote request buttons, modals, and related components
 */

/* Quote Request Button */
.ghd-quote-request-btn,
.ghd-quote-btn {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
    text-decoration: none;
}

.ghd-quote-request-btn:hover,
.ghd-quote-btn:hover {
    background: linear-gradient(135deg, #005a87 0%, #004463 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
    color: white;
    text-decoration: none;
}

.ghd-quote-request-btn:active,
.ghd-quote-btn:active {
    transform: translateY(0);
}

.ghd-quote-icon {
    font-size: 18px;
}

/* Quote Button in Header */
.ghd-quote-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #007cba;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.ghd-quote-section h3 {
    margin: 0 0 12px 0;
    color: #1d2327;
    font-size: 24px;
    font-weight: 600;
}

.ghd-quote-section p {
    margin: 0 0 20px 0;
    color: #646970;
    font-size: 16px;
}

.ghd-quote-section .ghd-quote-btn {
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
}

.ghd-quote-section .ghd-quote-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

@keyframes ghd-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Inline Quote Form */
.ghd-quote-form-container {
    background: white;
    border: 2px solid #e2e4e7;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin: 32px 0;
    overflow: hidden;
    transition: all 0.5s ease;
    max-height: 0 !important;
    opacity: 0 !important;
    transform: translateY(-20px);
    display: block !important;
}

.ghd-quote-form-container.ghd-form-visible {
    max-height: 1000px !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.ghd-quote-form-container.ghd-form-visible .ghd-form-content {
    padding: 32px;
}

.ghd-form-content {
    padding: 0;
    transition: padding 0.5s ease;
}

/* Form Header */
.ghd-form-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 24px 32px;
    border-bottom: none;
}

.ghd-form-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghd-form-header .ghd-close-form {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
    margin-left: auto;
}

.ghd-form-header .ghd-close-form:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Inline Success/Error Messages */
.ghd-inline-message {
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: ghd-message-slide-in 0.3s ease;
}

.ghd-inline-message.ghd-success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #28a745;
}

.ghd-inline-message.ghd-error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
}

.ghd-message-content {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghd-message-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.ghd-message-text {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.ghd-success-message .ghd-message-text {
    color: #155724;
}

.ghd-error-message .ghd-message-text {
    color: #721c24;
}

.ghd-message-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.ghd-success-message .ghd-message-close {
    color: #155724;
}

.ghd-error-message .ghd-message-close {
    color: #721c24;
}

.ghd-message-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

@keyframes ghd-message-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive for Inline Form */
@media (max-width: 768px) {
    .ghd-quote-section {
        padding: 20px;
        margin: 16px 0;
    }
    
    .ghd-quote-section h3 {
        font-size: 20px;
    }
    
    .ghd-quote-form-container {
        margin: 20px 0;
    }
    
    .ghd-form-header {
        padding: 20px 16px;
    }
    
    .ghd-form-header h3 {
        font-size: 18px;
    }
    
    .ghd-form-content {
        padding: 16px;
    }
    
    .ghd-quote-form-container.ghd-form-visible .ghd-form-content {
        padding: 16px;
    }
    
    .ghd-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ghd-btn {
        padding: 14px 24px;
        min-height: 48px;
    }
    
    .ghd-form-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .ghd-form-actions .ghd-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ghd-inline-message {
        margin: 16px 0;
    }
    
    .ghd-message-content {
        padding: 16px 20px;
    }
}

/* Old modal styles removed - now using inline form approach */

/* Form Styles */
.ghd-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

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

.ghd-form-half {
    flex: 1;
}

.ghd-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #1d2327;
}

.ghd-form-group .required {
    color: #d63638;
}

.ghd-form-group input,
.ghd-form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.ghd-form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.ghd-form-group input:focus,
.ghd-form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.ghd-form-group.ghd-error input,
.ghd-form-group.ghd-error textarea {
    border-color: #d63638;
}

.ghd-form-group.ghd-success input,
.ghd-form-group.ghd-success textarea {
    border-color: #00a32a;
}

.ghd-error-message {
    color: #d63638;
    font-size: 14px;
    margin-top: 4px;
}

/* Form Info */
.ghd-form-info {
    background: #f0f6fc;
    border: 1px solid #c3dafe;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.ghd-info-text {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #0c5460;
    font-size: 15px;
    line-height: 1.5;
}

.ghd-info-icon {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Form Actions */
.ghd-form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e4e7;
}

/* Buttons */
.ghd-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-height: 52px;
}

.ghd-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.ghd-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a87 0%, #004463 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4);
}

.ghd-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ghd-btn-secondary {
    background: #f6f7f7;
    color: #1d2327;
    border: 1px solid #ddd;
}

.ghd-btn-secondary:hover {
    background: #e2e4e7;
    color: #1d2327;
}

/* Loading Spinner */
.ghd-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success Modal */
.ghd-success-content {
    text-align: center;
}

.ghd-success-icon {
    font-size: 48px;
    margin: 20px 0;
}

.ghd-success-note {
    color: #646970;
    font-style: italic;
    margin-top: 16px;
}

/* Lead Opt-in Styles for Dashboard */
.ghd-lead-optin-section {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
}

.ghd-lead-optin-section h3 {
    margin-top: 0;
    color: #1d2327;
}

.ghd-lead-optin-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.ghd-lead-optin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f1;
}

.ghd-lead-optin-item:last-child {
    border-bottom: none;
}

.ghd-lead-optin-info {
    flex: 1;
}

.ghd-lead-optin-category {
    font-weight: 600;
    color: #1d2327;
}

.ghd-lead-optin-stats {
    font-size: 14px;
    color: #646970;
    margin-top: 4px;
}

.ghd-lead-optin-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghd-lead-optin-checkbox {
    width: 18px;
    height: 18px;
}

.ghd-max-leads {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Success Message */
.ghd-optin-success {
    position: fixed;
    top: 50px;
    right: 20px;
    background: #00a32a;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.3);
    animation: ghd-slide-in 0.3s ease;
}

@keyframes ghd-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Body class to prevent scrolling when modal is open */
body.ghd-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ghd-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .ghd-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ghd-form-actions {
        flex-direction: column;
    }
    
    .ghd-floating-quote-btn {
        bottom: 20px;
        right: 20px;
    }
    
    .ghd-floating-quote-btn .ghd-quote-btn {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .ghd-lead-optin-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ghd-lead-optin-controls {
        align-self: stretch;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .ghd-modal-body,
    .ghd-modal-header {
        padding: 16px;
    }
    
    .ghd-quote-request-btn,
    .ghd-quote-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}