/* COOLICAN Forms - Multi-Step Design */

/* Force full width and override theme styles */
.coolican-form-container {
    width: 100% !important;
    max-width: none !important;
    margin: 40px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Override any theme padding/margins */
.coolican-form-container * {
    box-sizing: border-box;
}

.coolican-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

/* Progress Indicator */
.coolican-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 10px;
}

.coolican-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.coolican-progress-step.coolican-step-active {
    opacity: 1;
}

.coolican-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: #ddd;
    z-index: -1;
}

.coolican-progress-step.coolican-step-active:not(:last-child)::after {
    background: #4CAF50;
}

.coolican-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: background 0.3s;
}

.coolican-progress-step.coolican-step-active .coolican-step-number {
    background: #4CAF50;
}

.coolican-step-label {
    font-size: 12px;
    text-align: center;
    color: #666;
    font-weight: 500;
}

.coolican-progress-step.coolican-step-active .coolican-step-label {
    color: #333;
    font-weight: 600;
}

/* Form Steps */
.coolican-form-step {
    display: none;
    animation: fadeInStep 0.4s ease;
}

.coolican-form-step.coolican-step-active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.coolican-step-title {
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    text-align: center;
}

/* Form Fields */
.coolican-form-field {
    margin-bottom: 20px;
}

.coolican-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.coolican-form-field .required {
    color: #e74c3c;
}

.coolican-form-field input[type="text"],
.coolican-form-field input[type="tel"],
.coolican-form-field input[type="email"],
.coolican-form-field input[type="date"],
.coolican-form-field select,
.coolican-form-field textarea {
    width: 100%;
    padding: 13px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.25s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.coolican-form-field input:focus,
.coolican-form-field select:focus,
.coolican-form-field textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.coolican-form-field input.error-field,
.coolican-form-field select.error-field {
    border-color: #e74c3c;
    background: #fff5f5;
}

.coolican-form-field textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Date input styling */
#coolican-date {
    cursor: pointer;
}

#coolican-date::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 18px;
}

/* Form Actions */
.coolican-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: space-between;
}

.coolican-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none !important;
    outline: none !important;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.coolican-btn-next,
.coolican-btn-submit {
    color: #fff;
    flex: 1;
    max-width: 200px;
    margin-left: auto;
}

.coolican-btn-prev {
    background: #f5f5f5 !important;
    color: #666 !important;
    flex: 0 0 auto;
}

.coolican-btn-prev:hover {
    background: #e0e0e0 !important;
}

.coolican-btn-next:hover,
.coolican-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.coolican-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* Messages */
#coolican-form-message,
#coolican-availability-warning {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coolican-success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.coolican-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 2px solid #bee5eb;
}

.coolican-error,
.coolican-warning {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Loading state */
.coolican-btn.loading {
    position: relative;
    color: transparent !important;
}

.coolican-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .coolican-form-container {
        margin: 0 !important;
        padding: 0 !important;
    }

    .coolican-form {
        padding: 15px;
        border-radius: 0;
        margin: 0;
        box-shadow: none;
        width: 100%;
    }

    .coolican-step-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .coolican-progress {
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .coolican-step-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .coolican-step-label {
        font-size: 11px;
    }

    .coolican-form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .coolican-btn {
        width: 100%;
        max-width: none;
    }

    .coolican-btn-next,
    .coolican-btn-submit {
        margin-left: 0;
        order: 2;
    }

    .coolican-btn-prev {
        order: 1;
    }
}

@media (max-width: 480px) {
    .coolican-form-container {
        padding: 0 !important;
        margin: 0 !important;
    }

    .coolican-form {
        padding: 10px;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
    }

    .coolican-step-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .coolican-form-field {
        margin-bottom: 15px;
    }

    .coolican-form-field input,
    .coolican-form-field select,
    .coolican-form-field textarea {
        padding: 12px 15px;
        font-size: 14px;
    }

    .coolican-progress {
        margin-bottom: 15px;
        padding: 0 10px;
    }
}
