/**
 * WebBuilder Client Collector - Form Styles
 */

/* Import Cairo font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&display=swap');

.wbcc-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    direction: rtl;
}

/* Progress Bar */
.wbcc-form-progress {
    margin-bottom: 40px;
    padding: 20px 0;
}

.wbcc-progress-bar {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-bottom: 20px;
    overflow: hidden;
}

.wbcc-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--progress-width, 14.28%);
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
    transition: width 0.3s ease;
}

.wbcc-progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.wbcc-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.wbcc-step.active {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
    color: #fff;
    transform: scale(1.1);
}

/* Form Sections */
.wbcc-form-section {
    display: none;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

.wbcc-form-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wbcc-section-title {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #333;
    font-weight: 600;
    border-bottom: 3px solid #0284c7;
    padding-bottom: 15px;
}

/* Form Fields */
.wbcc-field-group {
    margin-bottom: 25px;
}

.wbcc-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 16px;
}

.wbcc-label .required {
    color: #d63638;
    margin-right: 4px;
}

.wbcc-input,
.wbcc-textarea,
select.wbcc-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.wbcc-input:focus,
.wbcc-textarea:focus,
select.wbcc-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.wbcc-textarea {
    resize: vertical;
    min-height: 120px;
}

.wbcc-field-error {
    display: none;
    color: #d63638;
    font-size: 14px;
    margin-top: 5px;
}

.wbcc-field-error.show {
    display: block;
}

.wbcc-help-text {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.wbcc-char-count {
    float: left;
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

/* Character Counter */
.wbcc-char-count span {
    font-weight: 600;
    color: #0284c7;
}

/* File Input */
.wbcc-file-input {
    padding: 8px;
}

.wbcc-file-info {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

/* Color Picker */
.wbcc-color-picker-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wbcc-color-input {
    width: 60px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.wbcc-color-hex {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: monospace;
    font-size: 16px;
    width: 120px;
    background: #f9f9f9;
}

/* Checkboxes */
.wbcc-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wbcc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.wbcc-checkbox-label:hover {
    background: #f5f5f5;
}

.wbcc-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0284c7;
}

.wbcc-confirmation-checkbox {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

/* Repeatable Fields */
.wbcc-repeatable-field {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.wbcc-repeatable-field .wbcc-input {
    flex: 1;
}

.wbcc-remove-field {
    padding: 0 20px;
    background: #d63638;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.wbcc-remove-field:hover {
    background: #b02a2c;
}

.wbcc-add-field {
    padding: 10px 20px;
    background: #f0f0f0;
    color: #333;
    border: 2px dashed #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.wbcc-add-field:hover {
    background: #e0e0e0;
    border-color: #0284c7;
    color: #0284c7;
}

/* Social Links */
.wbcc-social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Buttons */
.wbcc-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    font-family: inherit;
}

.wbcc-btn-primary {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
    color: #fff;
}

.wbcc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.wbcc-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.wbcc-btn-secondary:hover {
    background: #e0e0e0;
}

.wbcc-btn-submit {
    font-size: 18px;
    padding: 15px 40px;
}

/* Section Navigation */
.wbcc-section-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

/* Success Message */
.wbcc-success-message {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.wbcc-success-content {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.wbcc-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a32a 0%, #00d084 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    font-weight: bold;
}

.wbcc-success-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
}

.wbcc-success-content p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Form Error Message */
.wbcc-form-error-message {
    margin-top: 20px;
    padding: 15px;
    background: #fef0f0;
    border: 2px solid #d63638;
    border-radius: 6px;
    color: #d63638;
    font-weight: 500;
    text-align: center;
    display: none;
}

.wbcc-form-error-message.show {
    display: block;
}

/* Loading Overlay */
.wbcc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.wbcc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wbcc-form-container {
        padding: 20px 15px;
    }

    .wbcc-form-section {
        padding: 25px 20px;
    }

    .wbcc-section-title {
        font-size: 24px;
    }

    .wbcc-social-links {
        grid-template-columns: 1fr;
    }

    .wbcc-section-navigation {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .wbcc-btn {
        width: 100%;
    }

    .wbcc-progress-steps {
        font-size: 12px;
    }

    .wbcc-step {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

