/* Floorplan Converter Frontend Styles - Protected against theme overrides */

/* High specificity container to prevent theme interference */
body .fpc-container,
.elementor .fpc-container,
.elementor-widget .fpc-container,
.wp-block .fpc-container,
.site-content .fpc-container,
[class*="elementor"] .fpc-container {
    max-width: 800px !important;
    margin: 40px auto !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    line-height: 1.6 !important;
    color: #333 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Header Section */
body .fpc-container .fpc-header,
.elementor .fpc-container .fpc-header,
.elementor-widget .fpc-container .fpc-header {
    background: linear-gradient(135deg, #009fe3 0%, #0284c7 100%) !important;
    padding: 40px 30px !important;
    text-align: center !important;
    border-radius: 12px 12px 0 0 !important;
    color: white !important;
    box-sizing: border-box !important;
}

body .fpc-container .fpc-logo,
.elementor .fpc-container .fpc-logo,
.elementor-widget .fpc-container .fpc-logo {
    width: 90px !important;
    height: 90px !important;
    background-color: white !important;
    border-radius: 20px !important;
    margin: 0 auto 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important;
    box-sizing: border-box !important;
}

body .fpc-container .fpc-logo img,
.elementor .fpc-container .fpc-logo img,
.elementor-widget .fpc-container .fpc-logo img {
    width: 70px !important;
    height: auto !important;
    max-height: 60px !important;
    box-sizing: border-box !important;
}

body .fpc-container .fpc-header h1,
.elementor .fpc-container .fpc-header h1,
.elementor-widget .fpc-container .fpc-header h1 {
    font-size: 28px !important;
    font-weight: 600 !important;
    margin: 0 0 10px 0 !important;
    color: white !important;
    font-family: inherit !important;
    line-height: 1.2 !important;
}

body .fpc-container .fpc-header p,
.elementor .fpc-container .fpc-header p,
.elementor-widget .fpc-container .fpc-header p {
    font-size: 16px !important;
    opacity: 0.9 !important;
    margin: 0 !important;
    color: white !important;
    font-family: inherit !important;
    line-height: 1.6 !important;
}

/* Form Container */
body .fpc-container .fpc-form-container,
.elementor .fpc-container .fpc-form-container,
.elementor-widget .fpc-container .fpc-form-container {
    background: white !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Progress Bar */
body .fpc-container .fpc-progress-bar,
.elementor .fpc-container .fpc-progress-bar,
.elementor-widget .fpc-container .fpc-progress-bar {
    display: flex !important;
    justify-content: space-between !important;
    padding: 30px 40px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    box-sizing: border-box !important;
}

body .fpc-container .fpc-progress-step,
.elementor .fpc-container .fpc-progress-step,
.elementor-widget .fpc-container .fpc-progress-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: 1 !important;
    position: relative !important;
    box-sizing: border-box !important;
}

body .fpc-container .fpc-progress-step:not(:last-child)::after,
.elementor .fpc-container .fpc-progress-step:not(:last-child)::after,
.elementor-widget .fpc-container .fpc-progress-step:not(:last-child)::after {
    content: '' !important;
    position: absolute !important;
    top: 20px !important;
    right: -50% !important;
    width: 100% !important;
    height: 2px !important;
    background: #e9ecef !important;
    z-index: 1 !important;
}

body .fpc-container .fpc-progress-step.active:not(:last-child)::after,
body .fpc-container .fpc-progress-step.completed:not(:last-child)::after,
.elementor .fpc-container .fpc-progress-step.active:not(:last-child)::after,
.elementor .fpc-container .fpc-progress-step.completed:not(:last-child)::after,
.elementor-widget .fpc-container .fpc-progress-step.active:not(:last-child)::after,
.elementor-widget .fpc-container .fpc-progress-step.completed:not(:last-child)::after {
    background: #009fe3 !important;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.fpc-progress-step.active .step-number,
.fpc-progress-step.completed .step-number {
    background: #009fe3;
    color: white;
}

.step-title {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
}

.fpc-progress-step.active .step-title,
.fpc-progress-step.completed .step-title {
    color: #009fe3;
}

/* Steps */
.fpc-step {
    display: none;
    padding: 40px 50px;
}

.fpc-step.active {
    display: block;
}

.fpc-step-content {
    width: 100%;
    max-width: 100%;
}

.fpc-step-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.step-description {
    color: #5a6c7d;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Customer Selection */
.fpc-customer-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

.fpc-customer-option {
    cursor: pointer;
    width: 100%;
    display: block;
}

.fpc-customer-option input[type="radio"] {
    display: none;
}

.customer-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
}

.customer-card:hover {
    border-color: #009fe3;
    box-shadow: 0 4px 15px rgba(0, 159, 227, 0.1);
}

.fpc-customer-option input[type="radio"]:checked + .customer-card {
    border-color: #009fe3;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    box-shadow: 0 4px 15px rgba(0, 159, 227, 0.15);
}

.customer-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    transition: all 0.3s ease;
}

.fpc-customer-option input[type="radio"]:checked + .customer-card .customer-icon {
    background: #009fe3;
    color: white;
}

.customer-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.customer-card p {
    color: #5a6c7d;
    font-size: 14px;
    margin: 0;
}

/* Form Elements */
.fpc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 30px;
    margin-bottom: 30px;
    align-items: start;
    width: 100%;
}

.fpc-form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.fpc-form-group.full-width {
    grid-column: 1 / -1;
}

.fpc-form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
}

.fpc-form-group input,
.fpc-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
    box-sizing: border-box;
    min-width: 0;
}

.fpc-form-group input:focus,
.fpc-form-group select:focus {
    outline: none;
    border-color: #009fe3;
    box-shadow: 0 0 0 3px rgba(0, 159, 227, 0.1);
}

.field-help {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* File Upload */
.fpc-file-upload-area {
    margin-bottom: 30px;
}

.fpc-file-drop-zone {
    border: 2px dashed #e9ecef;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.fpc-file-drop-zone:hover,
.fpc-file-drop-zone.dragover {
    border-color: #009fe3;
    background: #f0f9ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.fpc-file-drop-zone h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.fpc-file-drop-zone p {
    color: #5a6c7d;
    margin: 0;
}

.fpc-file-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-icon {
    font-size: 24px;
}

.file-text {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.remove-file:hover {
    background: #c82333;
}

/* Terms Section */
.fpc-terms-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.fpc-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.fpc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}

.fpc-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: transparent;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.fpc-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #3cac40;
    border-color: #3cac40;
    color: white;
}

.checkbox-text {
    font-size: 14px;
    color: #2c3e50;
}

.checkbox-text a {
    color: #009fe3;
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Navigation Buttons */
.fpc-step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.fpc-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.fpc-btn-next,
.fpc-btn-submit {
    background: linear-gradient(135deg, #009fe3 0%, #0284c7 100%);
    color: white;
    border: 2px solid transparent;
}

.fpc-btn-next:hover,
.fpc-btn-submit:hover {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 4px 15px rgba(0, 159, 227, 0.3);
}

.fpc-btn-back {
    background: white;
    color: #5a6c7d;
    border: 2px solid #e9ecef;
}

.fpc-btn-back:hover {
    border-color: #009fe3;
    color: #009fe3;
}

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

.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Messages */
.fpc-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.fpc-message.success {
    background: #d1f2eb;
    color: #155724;
    border: 1px solid #3cac40;
}

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

/* Info Section */
.fpc-info-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.fpc-info-section h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 30px;
}

.fpc-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.info-item {
    text-align: center;
}

.info-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.info-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.info-item p {
    color: #5a6c7d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fpc-container {
        margin: 20px;
    }
    
    .fpc-header {
        padding: 30px 20px;
    }
    
    .fpc-header h1 {
        font-size: 24px;
    }
    
    .fpc-progress-bar {
        padding: 20px;
    }
    
    .fpc-progress-step {
        flex-direction: column;
    }
    
    .step-title {
        font-size: 12px;
    }
    
    .fpc-step {
        padding: 30px 25px;
    }
    
    .fpc-customer-selection {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-bottom: 40px;
        width: 100%;
    }
    
    .fpc-form-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        width: 100%;
    }
    
    .fpc-form-group {
        width: 100%;
    }
    
    .fpc-file-drop-zone {
        padding: 40px 20px;
    }
    
    .fpc-step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .fpc-btn {
        width: 100%;
        justify-content: center;
    }
    
    .fpc-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .fpc-progress-bar {
        padding: 15px 10px;
    }
    
    .fpc-progress-step:not(:last-child)::after {
        display: none;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .fpc-customer-option {
        width: 100%;
        display: block;
        margin-bottom: 0;
    }
    
    .customer-card {
        padding: 25px 20px;
        min-height: 180px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .customer-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Success State */
.fpc-success-state {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.fpc-success-state h2 {
    color: #3cac40;
    font-size: 28px;
    margin-bottom: 15px;
}

.fpc-success-state > p {
    font-size: 16px;
    color: #5a6c7d;
    margin-bottom: 30px;
}

.success-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.success-details h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.success-details ul {
    list-style: none;
    padding: 0;
}

.success-details li {
    padding: 8px 0;
    color: #5a6c7d;
}

@media (max-width: 768px) {
    .fpc-success-state {
        padding: 40px 20px;
    }
    
    .success-icon {
        font-size: 60px;
    }
    
    .fpc-success-state h2 {
        font-size: 24px;
    }
}
