/* Auto-Save Contact Form Styles */

.ascf-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.ascf-form-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    transition: color 0.3s ease;
}

.ascf-contact-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Form steps container - Simple overflow hidden */
.ascf-form-steps-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Dynamic Form Steps - Simpler approach */
.ascf-form-step {
    display: none;
    width: 100%;
    animation-duration: 0.4s;
    animation-fill-mode: both;
}

.ascf-form-step.ascf-step-active {
    display: block;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide out to left */
@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide out to right */
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.ascf-form-step.slide-in-right {
    animation-name: slideInRight;
}

.ascf-form-step.slide-out-left {
    animation-name: slideOutLeft;
}

.ascf-form-step.slide-in-left {
    animation-name: slideInLeft;
}

.ascf-form-step.slide-out-right {
    animation-name: slideOutRight;
}

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

.ascf-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    transition: color 0.3s ease;
}

.ascf-required {
    color: #d9534f;
}

.ascf-input,
.ascf-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.ascf-input:focus,
.ascf-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

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

/* Step Navigation Buttons */
.ascf-step-navigation {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.ascf-next-btn,
.ascf-prev-btn,
.ascf-submit-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ascf-next-btn,
.ascf-submit-btn {
    background-color: #007cba;
    color: #fff;
    flex: 1;
    margin-top: 25px;
}

.ascf-next-btn:hover,
.ascf-submit-btn:hover {
    background-color: #005a87;
}

.ascf-prev-btn {
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.ascf-prev-btn:hover {
    background-color: #e0e0e0;
}

.ascf-submit-btn:disabled,
.ascf-next-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Step Indicator */
.ascf-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.ascf-step-indicator {
    display: flex;
    gap: 10px;
}

.ascf-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    transition: background-color 0.3s;
}

.ascf-step-dot.ascf-dot-active {
    background-color: #007cba;
}

.ascf-step-dot.ascf-dot-completed {
    background-color: #28a745;
}

/* Auto-save indicator */
.ascf-auto-save-indicator {
    font-size: 13px;
}

.ascf-save-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.ascf-save-status.saving {
    color: #856404;
    background-color: #fff3cd;
}

.ascf-save-status.saved {
    color: #155724;
    background-color: #d4edda;
}

.ascf-save-status.error {
    color: #721c24;
    background-color: #f8d7da;
}

/* Messages */
.ascf-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

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

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

.ascf-message p,
.ascf-message ul {
    margin: 0;
    padding: 0;
}

.ascf-message ul {
    list-style-position: inside;
}

/* Input Error Animation */
.ascf-input-error {
    animation: ascf-shake 0.5s;
    border-color: #d9534f !important;
}

@keyframes ascf-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Dark Mode Support */
body.dark-mode .ascf-form-title,
html.dark-mode .ascf-form-title,
[data-theme="dark"] .ascf-form-title {
    color: #e0e0e0;
}

body.dark-mode .ascf-contact-form,
html.dark-mode .ascf-contact-form,
[data-theme="dark"] .ascf-contact-form {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-mode .ascf-form-group label,
html.dark-mode .ascf-form-group label,
[data-theme="dark"] .ascf-form-group label {
    color: #e0e0e0;
}

body.dark-mode .ascf-input,
body.dark-mode .ascf-textarea,
html.dark-mode .ascf-input,
html.dark-mode .ascf-textarea,
[data-theme="dark"] .ascf-input,
[data-theme="dark"] .ascf-textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .ascf-input:focus,
body.dark-mode .ascf-textarea:focus,
html.dark-mode .ascf-input:focus,
html.dark-mode .ascf-textarea:focus,
[data-theme="dark"] .ascf-input:focus,
[data-theme="dark"] .ascf-textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

body.dark-mode .ascf-prev-btn,
html.dark-mode .ascf-prev-btn,
[data-theme="dark"] .ascf-prev-btn {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .ascf-prev-btn:hover,
html.dark-mode .ascf-prev-btn:hover,
[data-theme="dark"] .ascf-prev-btn:hover {
    background-color: #444;
}

body.dark-mode .ascf-save-status.saving,
html.dark-mode .ascf-save-status.saving,
[data-theme="dark"] .ascf-save-status.saving {
    color: #ffc107;
    background-color: #332b00;
}

body.dark-mode .ascf-save-status.saved,
html.dark-mode .ascf-save-status.saved,
[data-theme="dark"] .ascf-save-status.saved {
    color: #4caf50;
    background-color: #1b5e20;
}

body.dark-mode .ascf-save-status.error,
html.dark-mode .ascf-save-status.error,
[data-theme="dark"] .ascf-save-status.error {
    color: #f44336;
    background-color: #5d0000;
}

body.dark-mode .ascf-message.ascf-success,
html.dark-mode .ascf-message.ascf-success,
[data-theme="dark"] .ascf-message.ascf-success {
    background-color: #1b5e20;
    border-color: #2e7d32;
    color: #c8e6c9;
}

body.dark-mode .ascf-message.ascf-error,
html.dark-mode .ascf-message.ascf-error,
[data-theme="dark"] .ascf-message.ascf-error {
    background-color: #5d0000;
    border-color: #c62828;
    color: #ffcdd2;
}

body.dark-mode .ascf-step-dot,
html.dark-mode .ascf-step-dot,
[data-theme="dark"] .ascf-step-dot {
    background-color: #444;
}

/* Responsive design */
@media (max-width: 768px) {
    .ascf-form-wrapper {
        padding: 10px;
    }
    
    .ascf-contact-form {
        padding: 20px;
    }
    
    .ascf-form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ascf-step-navigation {
        width: 100%;
    }
    
    .ascf-next-btn,
    .ascf-prev-btn,
    .ascf-submit-btn {
        width: 100%;
    }
}

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

.ascf-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    transition: color 0.3s ease;
}

.ascf-required {
    color: #d9534f;
}

.ascf-input,
.ascf-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.ascf-input:focus,
.ascf-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

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

/* Step Navigation Buttons */
.ascf-step-navigation {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.ascf-next-btn,
.ascf-prev-btn,
.ascf-submit-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.ascf-next-btn,
.ascf-submit-btn {
    background-color: #007cba;
    color: #fff;
    flex: 1;
}

.ascf-next-btn:hover,
.ascf-submit-btn:hover {
    background-color: #005a87;
}

.ascf-prev-btn {
    background-color: #f0f0f0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.ascf-prev-btn:hover {
    background-color: #e0e0e0;
}

.ascf-submit-btn:disabled,
.ascf-next-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Step Indicator */
.ascf-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.ascf-step-indicator {
    display: flex;
    gap: 10px;
}

.ascf-step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ddd;
    transition: background-color 0.3s;
}

.ascf-step-dot.ascf-dot-active {
    background-color: #007cba;
}

.ascf-step-dot.ascf-dot-completed {
    background-color: #28a745;
}

/* Auto-save indicator */
.ascf-auto-save-indicator {
    font-size: 13px;
}

.ascf-save-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.ascf-save-status.saving {
    color: #856404;
    background-color: #fff3cd;
}

.ascf-save-status.saved {
    color: #155724;
    background-color: #d4edda;
}

.ascf-save-status.error {
    color: #721c24;
    background-color: #f8d7da;
}

/* Messages */
.ascf-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

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

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

.ascf-message p,
.ascf-message ul {
    margin: 0;
    padding: 0;
}

.ascf-message ul {
    list-style-position: inside;
}

/* Input Error Animation */
.ascf-input-error {
    animation: ascf-shake 0.5s;
    border-color: #d9534f !important;
}

@keyframes ascf-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Dark Mode Support */
body.dark-mode .ascf-form-title,
html.dark-mode .ascf-form-title,
[data-theme="dark"] .ascf-form-title {
    color: #e0e0e0;
}

body.dark-mode .ascf-contact-form,
html.dark-mode .ascf-contact-form,
[data-theme="dark"] .ascf-contact-form {
    background: #1e1e1e;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-mode .ascf-form-group label,
html.dark-mode .ascf-form-group label,
[data-theme="dark"] .ascf-form-group label {
    color: #e0e0e0;
}

body.dark-mode .ascf-input,
body.dark-mode .ascf-textarea,
html.dark-mode .ascf-input,
html.dark-mode .ascf-textarea,
[data-theme="dark"] .ascf-input,
[data-theme="dark"] .ascf-textarea {
    background: #2a2a2a;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .ascf-input:focus,
body.dark-mode .ascf-textarea:focus,
html.dark-mode .ascf-input:focus,
html.dark-mode .ascf-textarea:focus,
[data-theme="dark"] .ascf-input:focus,
[data-theme="dark"] .ascf-textarea:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

body.dark-mode .ascf-prev-btn,
html.dark-mode .ascf-prev-btn,
[data-theme="dark"] .ascf-prev-btn {
    background-color: #333;
    color: #e0e0e0;
}

body.dark-mode .ascf-prev-btn:hover,
html.dark-mode .ascf-prev-btn:hover,
[data-theme="dark"] .ascf-prev-btn:hover {
    background-color: #444;
}

body.dark-mode .ascf-save-status.saving,
html.dark-mode .ascf-save-status.saving,
[data-theme="dark"] .ascf-save-status.saving {
    color: #ffc107;
    background-color: #332b00;
}

body.dark-mode .ascf-save-status.saved,
html.dark-mode .ascf-save-status.saved,
[data-theme="dark"] .ascf-save-status.saved {
    color: #4caf50;
    background-color: #1b5e20;
}

body.dark-mode .ascf-save-status.error,
html.dark-mode .ascf-save-status.error,
[data-theme="dark"] .ascf-save-status.error {
    color: #f44336;
    background-color: #5d0000;
}

body.dark-mode .ascf-message.ascf-success,
html.dark-mode .ascf-message.ascf-success,
[data-theme="dark"] .ascf-message.ascf-success {
    background-color: #1b5e20;
    border-color: #2e7d32;
    color: #c8e6c9;
}

body.dark-mode .ascf-message.ascf-error,
html.dark-mode .ascf-message.ascf-error,
[data-theme="dark"] .ascf-message.ascf-error {
    background-color: #5d0000;
    border-color: #c62828;
    color: #ffcdd2;
}

body.dark-mode .ascf-step-dot,
html.dark-mode .ascf-step-dot,
[data-theme="dark"] .ascf-step-dot {
    background-color: #444;
}

/* Responsive design */
@media (max-width: 768px) {
    .ascf-form-wrapper {
        padding: 10px;
    }
    
    .ascf-contact-form {
        padding: 20px;
    }
    
    .ascf-form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ascf-step-navigation {
        width: 100%;
    }
    
    .ascf-next-btn,
    .ascf-prev-btn,
    .ascf-submit-btn {
        width: 100%;
    }
}
