/* Mobile OTP Registration Styles */

.mor-registration-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Progress Tracker */
.mor-progress-tracker {
    position: relative;
    margin-bottom: 40px;
    padding: 30px 0;
}

.mor-progress-bar {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    background: linear-gradient(to right, #4CAF50, #2196F3);
    border-radius: 2px;
    transition: width 0.4s ease;
    z-index: 1;
}

.mor-step-circles {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.mor-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #999;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mor-step-circle.active {
    border-color: #4CAF50;
    color: #4CAF50;
    background: #f1f8f4;
    transform: scale(1.1);
}

.mor-step-circle.completed {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

/* Form Container */
.mor-registration-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Stages */
.mor-stage {
    display: none;
    animation: fadeIn 0.4s ease;
}

.mor-stage.active {
    display: block;
}

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

/* Form Title */
.mor-form-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    text-align: center;
}

.mor-form-subtitle {
    font-size: 16px;
    color: #666;
    text-align: center;
    margin: 0 0 30px 0;
}

/* Field Groups */
.mor-field-group {
    margin-bottom: 24px;
}

.mor-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mor-field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.mor-field-label .required {
    color: #f44336;
    margin-left: 2px;
}

/* Input Fields */
.mor-registration-form input[type="text"],
.mor-registration-form input[type="email"],
.mor-registration-form input[type="tel"],
.mor-registration-form input[type="password"],
.mor-registration-form select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.mor-registration-form input:focus,
.mor-registration-form select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.mor-registration-form input.error,
.mor-registration-form select.error {
    border-color: #f44336;
}

/* Field Description */
.mor-field-description {
    font-size: 13px;
    color: #666;
    margin-top: 6px;
}

/* Checkbox List for Classes */
.mor-checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.mor-checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.mor-checkbox-item:hover {
    border-color: #4CAF50;
    background: #f9fff9;
}

.mor-checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mor-checkbox-item:has(input[type="checkbox"]:checked) {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.mor-checkbox-item span {
    font-size: 15px;
    color: #333;
}

/* Searchable Subjects Select */
.mor-searchable-select {
    position: relative;
    margin-top: 10px;
}

.mor-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>') no-repeat 12px center;
}

.mor-search-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.mor-subjects-list {
    max-height: 250px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    display: none;
}

.mor-subjects-list.active {
    display: block;
}

.mor-subject-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.mor-subject-item:hover {
    background: #f9fff9;
}

.mor-subject-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mor-subject-item.selected {
    background: #f1f8f4;
}

.mor-subject-item label {
    cursor: pointer;
    flex: 1;
    margin: 0;
}

/* Selected Subjects Display */
.mor-selected-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    min-height: 40px;
}

.mor-selected-subject-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #4CAF50;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    gap: 8px;
}

.mor-selected-subject-tag .remove-subject {
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.mor-selected-subject-tag .remove-subject:hover {
    opacity: 1;
}

/* Demo Class Note */
.mor-demo-note {
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 15px;
    color: #856404;
}

.mor-demo-note strong {
    display: block;
    margin-bottom: 5px;
}

/* General Checkbox Label (for legal agreement, etc.) */
.mor-checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.mor-checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

/* Delivery Method Options */
.mor-delivery-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.mor-radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mor-radio-label:hover {
    border-color: #4CAF50;
    background: #f9fff9;
}

.mor-radio-label input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.mor-radio-label input[type="radio"]:checked + .mor-radio-text {
    color: #4CAF50;
    font-weight: 600;
}

.mor-radio-label:has(input[type="radio"]:checked) {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.mor-radio-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #333;
}

.mor-radio-text svg {
    flex-shrink: 0;
}

/* Buttons */
.mor-button-group {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.mor-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mor-btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.mor-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.mor-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 2px solid #e0e0e0;
}

.mor-btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

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

/* Timer */
.mor-timer {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 14px;
    color: #856404;
    font-weight: 500;
}

.mor-timer #countdown {
    font-weight: 700;
    color: #f44336;
}

/* Alert Messages */
.mor-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mor-alert.success {
    background: #4CAF50;
    color: white;
}

.mor-alert.error {
    background: #f44336;
    color: white;
}

.mor-alert.info {
    background: #2196F3;
    color: white;
}

/* Validation Messages */
.mor-validation-message {
    font-size: 13px;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 4px;
}

.mor-validation-message.success {
    color: #4CAF50;
    background: #f1f8f4;
}

.mor-validation-message.error {
    color: #f44336;
    background: #ffebee;
}

/* Loading State */
.mor-btn.loading {
    position: relative;
    color: transparent;
}

.mor-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mor-registration-container {
        padding: 10px;
        margin: 20px auto;
    }
    
    .mor-registration-form {
        padding: 24px 20px;
    }
    
    .mor-form-title {
        font-size: 24px;
    }
    
    .mor-field-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .mor-step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .mor-button-group {
        flex-direction: column;
    }
    
    .mor-alert {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .mor-delivery-options {
        flex-direction: column;
        gap: 10px;
    }
    
    .mor-radio-label {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .mor-step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .mor-registration-form {
        padding: 20px 16px;
    }
    
    .mor-form-title {
        font-size: 20px;
    }
    
    .mor-form-subtitle {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .mor-registration-container {
        box-shadow: none;
    }
    
    .mor-btn {
        display: none;
    }
}

/* Mobile Dropdown Fix - Add to the END of style.css */

/* Better mobile dropdown styling */
@media (max-width: 768px) {
    /* Make select dropdowns larger on mobile */
    .mor-registration-form select {
        padding: 16px 12px !important;
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 50px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 20px;
        padding-right: 40px !important;
    }
    
    /* Increase touch target size */
    .mor-registration-form select option {
        padding: 12px 8px;
        min-height: 44px; /* Apple's recommended touch target */
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Make dropdown list taller when opened */
    .mor-registration-form select:focus,
    .mor-registration-form select:active {
        max-height: 400px;
    }
}

/* For very small screens */
@media (max-width: 480px) {
    .mor-registration-form select {
        padding: 18px 12px !important;
        min-height: 54px;
        font-size: 17px !important; /* Larger for tiny screens */
    }
    
    .mor-registration-form select option {
        padding: 14px 10px;
        min-height: 48px;
        font-size: 17px;
    }
}

/* Fix for iOS Safari specifically */
@supports (-webkit-touch-callout: none) {
    .mor-registration-form select {
        font-size: 16px !important; /* Prevents auto-zoom */
        min-height: 54px;
    }
}
