/* Event Code Registration - Frontend Styles */

.ecr-form-wrapper {
    max-width: 450px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ecr-form-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 8px;
    text-align: center;
}

.ecr-form-description {
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 13px;
}

.ecr-registration-form {
    width: 100%;
}

.ecr-form-group {
    margin-bottom: 14px;
}

.ecr-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
}

.ecr-form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.ecr-form-control {
    width: 100%;
    padding: 9px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.ecr-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ecr-form-control.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.ecr-error-message {
    display: block;
    color: #e74c3c;
    font-size: 11px;
    margin-top: 2px;
}

.ecr-helper-text {
    display: block;
    color: #999;
    font-size: 11px;
    margin-top: 2px;
}

.ecr-form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.ecr-form-checkbox label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.ecr-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.ecr-btn {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ecr-btn-primary {
    background: #667eea !important;
    color: #ffffff;
}

.ecr-btn-primary:hover {
    background: #764ba2 !important;
    color: #ffffff;
}

.ecr-btn-primary:active {
    transform: translateY(0);
}

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

.ecr-message {
    padding: 12px;
    border-radius: 4px;
    margin-top: 14px;
    text-align: center;
    animation: slideIn 0.3s ease;
    font-size: 13px;
}

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

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

.ecr-message.loading {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.ecr-message.success::before {
    content: "✓ ";
    font-weight: bold;
}

.ecr-message.error::before {
    content: "✕ ";
    font-weight: bold;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner */
.ecr-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive design */
@media (max-width: 600px) {
    .ecr-form-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .ecr-form-title {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .ecr-btn {
        padding: 9px 16px;
        font-size: 13px;
    }
    
    .ecr-form-group {
        margin-bottom: 12px;
    }
}
