/* Contact Form Plugin - Modern Styling */

.cfp-form-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 0 20px;
}

.cfp-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    transition: box-shadow 0.3s ease;
}

.cfp-form-wrapper:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.cfp-form-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 30px 0;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.cfp-form-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.cfp-form {
    width: 100%;
}

.cfp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .cfp-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.cfp-form-group {
    margin-bottom: 25px;
}

.cfp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.cfp-required {
    color: #e74c3c;
    font-weight: 700;
}

.cfp-input,
.cfp-textarea,
.cfp-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #2c3e50;
    background: #f8f9fa;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.cfp-form-group label {
    font-family: inherit;
}

.cfp-input:focus,
.cfp-textarea:focus,
.cfp-select:focus {
    outline: none;
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cfp-input::placeholder,
.cfp-textarea::placeholder {
    color: #95a5a6;
}

.cfp-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.cfp-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2334495e' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.cfp-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #10b981;
    border: 1px solid #10b981;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;
    text-align: center;
    display: block;
    box-sizing: border-box;
}

.cfp-submit-btn:hover {
    background: #059669;
    border-color: #059669;
}

.cfp-submit-btn:active {
    background: #047857;
    border-color: #047857;
}

.cfp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #10b981;
}

.cfp-form-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cfp-form-message.success {
    display: block;
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.cfp-form-message.error {
    display: block;
    background: #f3f4f6;
    color: #dc2626;
    border: 1px solid #d1d5db;
}

.cfp-btn-loader {
    display: inline-block;
}

/* WP Forms Style - Clean and Minimal */
.cfp-wpforms-style {
    max-width: 800px;
    margin: 0 !important;
    font-family: inherit;
}

.cfp-wpforms-style .cfp-form-wrapper {
    background: #ffffff;
    border: none;
    box-shadow: none;
    padding: 0;
    font-family: inherit;
}

.cfp-wpforms-style .cfp-form-group {
    margin-bottom: 15px;
    font-family: inherit;
}

.cfp-wpforms-style .cfp-form-group:last-of-type {
    margin-bottom: 0;
}

.cfp-wpforms-style .cfp-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 5px;
    line-height: 1.3;
    font-family: inherit;
}

.cfp-wpforms-style .cfp-required {
    color: #d63638;
    font-weight: 600;
}

.cfp-wpforms-style .cfp-input,
.cfp-wpforms-style .cfp-textarea,
.cfp-wpforms-style .cfp-select {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #2c3338;
    background: #ffffff;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: inherit;
}

.cfp-wpforms-style .cfp-input:focus,
.cfp-wpforms-style .cfp-textarea:focus,
.cfp-wpforms-style .cfp-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.cfp-wpforms-style .cfp-textarea {
    resize: vertical;
    min-height: 100px;
}

.cfp-wpforms-style .cfp-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3338' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    appearance: none;
    cursor: pointer;
}

.cfp-wpforms-style .cfp-submit-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    background: #10b981;
    border: 1px solid #10b981;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.15s ease-in-out, border-color 0.15s ease-in-out;
    text-align: center;
    display: block;
    box-sizing: border-box;
    font-family: inherit;
    margin-top: 5px;
}

.cfp-wpforms-style .cfp-submit-btn:hover {
    background: #059669;
    border-color: #059669;
}

.cfp-wpforms-style .cfp-submit-btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 1px #fff, 0 0 0 3px #10b981;
}

.cfp-wpforms-style .cfp-submit-btn:active {
    background: #047857;
    border-color: #047857;
}

.cfp-wpforms-style .cfp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #10b981;
}

.cfp-wpforms-style .cfp-form-message {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.4;
}

.cfp-wpforms-style .cfp-form-message.success {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.cfp-wpforms-style .cfp-form-message.error {
    background: #f3f4f6;
    color: #dc2626;
    border: 1px solid #d1d5db;
}

/* Form row for side by side fields on desktop */
.cfp-wpforms-style .cfp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.cfp-wpforms-style .cfp-form-row .cfp-form-group {
    margin-bottom: 0;
}

/* Mobile: single column */
@media (max-width: 768px) {
    .cfp-wpforms-style .cfp-form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }
    
    .cfp-wpforms-style .cfp-form-row .cfp-form-group {
        margin-bottom: 15px;
    }
    
    .cfp-wpforms-style {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .cfp-wpforms-style .cfp-form-group {
        margin-bottom: 12px;
    }
    
    .cfp-wpforms-style .cfp-input,
    .cfp-wpforms-style .cfp-textarea,
    .cfp-wpforms-style .cfp-select {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .cfp-wpforms-style .cfp-submit-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}

/* SEOGuruji Style - Quote Form Specific Styles */
.cfp-seoguruji-style {
    max-width: 900px;
}

.cfp-form-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    padding: 40px 30px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    margin-bottom: 0;
}

.cfp-logo-section {
    color: #ffffff;
}

.cfp-brand-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cfp-brand-tagline {
    font-size: 16px;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    letter-spacing: 1px;
}

.cfp-quote-form .cfp-form-wrapper {
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    margin-top: 0;
    padding: 50px 40px;
}

.cfp-form-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 15px;
    margin: -10px 0 35px 0;
    line-height: 1.6;
}

.cfp-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f1f5f9;
}

.cfp-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.cfp-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 25px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #3b82f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cfp-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.cfp-label-icon {
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.cfp-quote-form .cfp-form-title {
    color: #1e293b;
    font-size: 36px;
    margin-bottom: 15px;
}

.cfp-quote-form .cfp-form-title::after {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 80px;
    height: 4px;
}

.cfp-quote-form .cfp-form-group label {
    color: #334155;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.cfp-quote-form .cfp-input,
.cfp-quote-form .cfp-textarea,
.cfp-quote-form .cfp-select {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #1e293b;
    font-size: 15px;
    transition: all 0.3s ease;
}

.cfp-quote-form .cfp-input::placeholder,
.cfp-quote-form .cfp-textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

.cfp-quote-form .cfp-input:focus,
.cfp-quote-form .cfp-textarea:focus,
.cfp-quote-form .cfp-select:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

.cfp-quote-form .cfp-submit-section {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
}

/* Quote form button uses wpforms style - no override needed */

.cfp-btn-icon {
    font-size: 20px;
}

.cfp-submit-note {
    margin-top: 15px;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.cfp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cfp-form-wrapper {
        padding: 30px 20px;
    }
    
    .cfp-form-title {
        font-size: 26px;
    }
    
    .cfp-input,
    .cfp-textarea,
    .cfp-select {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .cfp-submit-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    /* SEOGuruji Style Responsive */
    .cfp-seoguruji-style {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .cfp-form-header {
        padding: 30px 20px;
    }
    
    .cfp-brand-title {
        font-size: 32px;
    }
    
    .cfp-brand-tagline {
        font-size: 14px;
    }
    
    .cfp-quote-form .cfp-form-wrapper {
        padding: 30px 20px;
    }
    
    .cfp-quote-form .cfp-form-title {
        font-size: 28px;
    }
    
    .cfp-form-subtitle {
        font-size: 14px;
    }
    
    .cfp-section-title {
        font-size: 18px;
    }
    
    .cfp-quote-form .cfp-submit-btn {
        padding: 14px 24px;
        font-size: 16px;
        width: 100%;
    }
    
    .cfp-form-section {
        margin-bottom: 30px;
        padding-bottom: 25px;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cfp-btn-loader::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
