/* Mustaf Event Form - Frontend Styles */

.mustaf-event-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 12px;
    box-sizing: border-box;
}

/* Light Theme */
.mustaf-theme-light {
    background: rgba(255, 255, 255, 0.7);
}

.mustaf-theme-light .mustaf-input {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    color: #333333;
}

.mustaf-theme-light .mustaf-input::placeholder {
    color: #333333;
    opacity: 0.7;
}

.mustaf-theme-light .mustaf-checkbox-text {
    color: #333333;
}

.mustaf-theme-light .mustaf-checkbox-text a {
    color: #0066cc;
}

.mustaf-theme-light .mustaf-submit-button {
    background: #ffffff;
    color: #333333;
    border: none;
}

.mustaf-theme-light .mustaf-submit-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Dark Theme */
.mustaf-theme-dark {
    background: rgba(0, 0, 0, 0.7);
}

.mustaf-theme-dark .mustaf-input {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #ffffff;
}

.mustaf-theme-dark .mustaf-input::placeholder {
    color: #ffffff;
    opacity: 0.7;
}

.mustaf-theme-dark .mustaf-checkbox-text {
    color: #ffffff;
}

.mustaf-theme-dark .mustaf-checkbox-text a {
    color: #66b3ff;
}

.mustaf-theme-dark .mustaf-submit-button {
    background: #000000;
    color: #ffffff;
    border: none;
}

.mustaf-theme-dark .mustaf-submit-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

/* Required field indicator */
.mustaf-required {
    color: #dc3232;
}

/* Form Elements */
.mustaf-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mustaf-form-field {
    width: 100%;
}

.mustaf-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.mustaf-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.mustaf-theme-dark .mustaf-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
}

/* Consents */
.mustaf-form-consents {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.mustaf-consent-field {
    display: block;
}

.mustaf-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.mustaf-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0066cc;
}

.mustaf-checkbox-text {
    font-size: 14px;
    line-height: 1.5;
    user-select: none;
}

.mustaf-checkbox-text a {
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.mustaf-checkbox-text a:hover {
    opacity: 0.8;
}

/* Submit Button */
.mustaf-form-submit {
    margin-top: 10px;
}

.mustaf-submit-button {
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mustaf-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mustaf-submit-button:not(:disabled):active {
    transform: translateY(0);
}

/* Messages */
.mustaf-form-messages {
    margin: 10px 0;
    padding: 0;
}

.mustaf-message {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
}

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

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

/* Success Message */
.mustaf-success-message {
    text-align: center;
    padding: 60px 20px;
}

.mustaf-success-content {
    animation: fadeInUp 0.6s ease;
}

.mustaf-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    stroke: #28a745;
    animation: checkmark 0.8s ease;
}

.mustaf-theme-dark .mustaf-success-icon {
    stroke: #4ade80;
}

.mustaf-success-message h3 {
    font-size: 28px;
    margin: 0 0 10px;
    font-weight: 600;
}

.mustaf-theme-light .mustaf-success-message h3 {
    color: #333333;
}

.mustaf-theme-dark .mustaf-success-message h3 {
    color: #ffffff;
}

.mustaf-success-message p {
    font-size: 16px;
    margin: 0;
    opacity: 0.8;
}

.mustaf-theme-light .mustaf-success-message p {
    color: #666666;
}

.mustaf-theme-dark .mustaf-success-message p {
    color: #cccccc;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading State */
.mustaf-event-form.mustaf-loading .mustaf-submit-button::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid;
    border-color: currentColor transparent currentColor transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .mustaf-event-form-wrapper {
        padding: 30px 20px;
    }
    
    .mustaf-input {
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .mustaf-submit-button {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .mustaf-checkbox-text {
        font-size: 13px;
    }
    
    .mustaf-success-icon {
        width: 60px;
        height: 60px;
    }
    
    .mustaf-success-message h3 {
        font-size: 24px;
    }
}

/* Accessibility */
.mustaf-input:invalid:not(:placeholder-shown) {
    box-shadow: 0 0 0 2px #dc3232;
}

.mustaf-checkbox:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.mustaf-submit-button:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}
