/**
 * Registration Interface Stylesheet
 * 
 * This stylesheet provides a modern, dark-themed design for the Midway registration system.
 * Features responsive design, accessibility considerations, and interactive elements.
 * 
 * Design System:
 * - Dark theme with high contrast ratios
 * - Blue accent color (#4b6cb7) for interactive elements
 * - Open Sans font family for readability
 * - Mobile-first responsive approach
 * 
 * @author GoneClear Development Team
 * @version 2.1 - Moved all inline styles to CSS
 * @since 2025
 */

/* ============================================================================
   FONT IMPORTS
   ============================================================================ */

/* Import Open Sans font family from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap');

/* ============================================================================
   RESET AND BASE STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    background-color: #121212;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

/* ============================================================================
   CONTAINER STYLES
   ============================================================================ */

.container {
    width: 100%;
    max-width: 550px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================================================
   LOGO STYLES
   ============================================================================ */

.logo-container {
    margin-bottom: 30px;
    text-align: center;
}

.logo-container img {
    max-height: 80px;
    width: auto;
    max-width: 100%;
}

/* ============================================================================
   FORM CONTAINER STYLES
   ============================================================================ */

.register-form {
    width: 100%;
    background-color: #222222;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   TYPOGRAPHY STYLES
   ============================================================================ */

h1 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

/* ============================================================================
   REGISTRATION PROCESS INFO
   ============================================================================ */

.process-info {
    background: #e3f2fd;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 0 0 25px 0;
    border-left: 4px solid #1976d2;
}

.process-info strong {
    color: #1976d2;
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 600;
}

.process-info ol {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
}

.process-info ol li {
    margin: 6px 0;
}

/* ============================================================================
   FORM ELEMENT STYLES
   ============================================================================ */

.input-field {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    font-size: 16px;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.5);
    background-color: #3a3a3a;
}

/* Placeholder styling */
input::placeholder {
    color: #666;
    opacity: 1;
}

input:focus::placeholder {
    color: #777;
}

/* Small helper text under inputs */
input + small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 12px;
}

/* ============================================================================
   PHONE INPUT WRAPPER
   ============================================================================ */

.phone-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.country-code-select {
    width: 120px;
    padding: 12px 10px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.country-code-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(75, 108, 183, 0.5);
    background-color: #3a3a3a;
}

.phone-input-wrapper input[type="tel"] {
    flex: 1;
    margin: 0;
}

/* ============================================================================
   PASSWORD INPUT WRAPPER
   ============================================================================ */

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #4b6cb7;
}

/* ============================================================================
   VALIDATION FEEDBACK
   ============================================================================ */

.validation-feedback {
    margin-top: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 20px;
}

.validation-feedback.success {
    color: #34d399;
}

.validation-feedback.error {
    color: #ef4444;
}

.validation-feedback.checking {
    color: #fbbf24;
}

.validation-feedback i {
    font-size: 16px;
}

/* ============================================================================
   USERNAME SUGGESTIONS
   ============================================================================ */

.username-suggestions {
    margin-top: 10px;
}

.suggestions-header {
    font-size: 13px;
    color: #999;
    margin-bottom: 8px;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-item {
    background: #333;
    color: #4b6cb7;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #444;
}

.suggestion-item:hover {
    background: #444;
    border-color: #4b6cb7;
    transform: translateY(-1px);
}

/* ============================================================================
   PASSWORD STRENGTH INDICATOR
   ============================================================================ */

.password-strength {
    margin-top: 10px;
    margin-bottom: 15px;
}

.strength-bar {
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar-fill.weak {
    background: #ef4444;
}

.strength-bar-fill.fair {
    background: #fbbf24;
}

.strength-bar-fill.good {
    background: #3b82f6;
}

.strength-bar-fill.strong {
    background: #34d399;
}

.strength-text {
    font-size: 12px;
    color: #999;
}

/* ============================================================================
   PASSWORD REQUIREMENTS
   ============================================================================ */

.password-requirements {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
    transition: color 0.2s;
}

.requirement i {
    font-size: 16px;
    color: #ef4444;
    transition: color 0.2s;
}

.requirement.met {
    color: #34d399;
}

.requirement.met i {
    color: #34d399;
}

/* ============================================================================
   LAYOUT UTILITIES
   ============================================================================ */

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.two-columns .input-field {
    margin-bottom: 0;
}

/* ============================================================================
   BUTTON STYLES
   ============================================================================ */

.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: #4b6cb7;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background-color: #3b5998;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 108, 183, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #444;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ============================================================================
   SEPARATOR STYLES
   ============================================================================ */

.separator {
    position: relative;
    text-align: center;
    margin: 30px 0;
}

.separator::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #444;
}

.separator span {
    position: relative;
    background-color: #222;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* ============================================================================
   ACCOUNT LINKS SECTION
   ============================================================================ */

.account-links {
    margin-top: 25px;
    text-align: center;
}

.account-links p {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 14px;
}

/* ============================================================================
   MESSAGE STYLES
   ============================================================================ */

.success-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: rgba(52, 211, 153, 0.2);
    color: #34d399;
    border-left: 4px solid #34d399;
}

.error-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}

/* ============================================================================
   SUCCESS MODAL STYLES
   ============================================================================ */

.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #222;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.modal-icon {
    color: #4bb543;
    font-size: 48px;
    margin-bottom: 20px;
}

.modal-content h2 {
    margin-bottom: 15px;
    font-size: 24px;
}

.modal-content p {
    margin-bottom: 25px;
    color: #ccc;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-login-btn,
.modal-close-btn {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-login-btn {
    background-color: #4b6cb7;
    color: white;
    border: none;
}

.modal-login-btn:hover {
    background-color: #3b5998;
}

.modal-close-btn {
    background-color: #333;
    color: white;
    border: none;
}

.modal-close-btn:hover {
    background-color: #444;
}

/* ==========================================
     Tooltip Icon Container 
================================================*/

.tooltip-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    color: #4b6cb7;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.tooltip-icon:hover {
    color: #667eea;
    transform: scale(1.1);
}

.tooltip-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: normal;
    white-space: normal;
    width: 280px;
    max-width: 280px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    line-height: 1.5;
    border: 1px solid #444;
}

.tooltip-icon::before {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(5px);
    border: 6px solid transparent;
    border-right-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1001;
}

.tooltip-icon:hover::after,
.tooltip-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

.tooltip-icon:hover::after {
    transform: translateY(-50%) translateX(15px);
}

.tooltip-icon:hover::before {
    transform: translateY(-50%) translateX(10px);
}

/* ============================================================================
   RESPONSIVE DESIGN - TABLET
   ============================================================================ */

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
    
    .register-form {
        padding: 25px 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    /* Position tooltip below icon on mobile */
    .tooltip-icon::after {
        left: 50%;
        right: auto;
        top: 100%;
        transform: translateX(-50%) translateY(10px);
        width: 250px;
        max-width: calc(100vw - 40px);
    }

    .tooltip-icon::before {
        left: 50%;
        right: auto;
        top: 100%;
        transform: translateX(-50%) translateY(5px) rotate(90deg);
        border-right-color: transparent;
        border-bottom-color: #333;
    }

    .tooltip-icon:hover::after {
        transform: translateX(-50%) translateY(15px);
    }

    .tooltip-icon:hover::before {
        transform: translateX(-50%) translateY(10px) rotate(90deg);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE
   ============================================================================ */

@media screen and (max-width: 576px) {
    body {
        padding: 10px 0;
    }
    
    .container {
        padding: 10px;
    }
    
    .register-form {
        padding: 20px 16px;
        border-radius: 16px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .two-columns {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }
    
    .two-columns .input-field {
        margin-bottom: 20px;
    }
    
    .input-field input,
    .input-field select {
        font-size: 16px;
        padding: 14px 15px;
        border-radius: 8px;
    }
    
    .process-info {
        padding: 14px 16px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .process-info strong {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .process-info ol {
        font-size: 13px;
        padding-left: 18px;
    }
    
    .process-info ol li {
        margin: 5px 0;
        line-height: 1.5;
    }
    
    .btn-primary {
        padding: 16px;
        font-size: 16px;
        border-radius: 12px;
        font-weight: 600;
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .btn-secondary {
        padding: 12px;
        border-radius: 12px;
        font-size: 15px;
    }
    
    .btn-secondary:active {
        transform: scale(0.98);
        background-color: #444;
    }
    
    .account-links {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #444;
    }
    
    .account-links p {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .separator {
        margin: 25px 0;
    }
    
    .modal-content {
        padding: 25px 20px;
        width: 95%;
    }
    
    .modal-icon {
        font-size: 40px;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-login-btn,
    .modal-close-btn {
        width: 100%;
        padding: 12px;
    }
    
    .phone-input-wrapper {
        flex-direction: row;
    }
    
    .country-code-select {
        width: 100px;
        font-size: 14px;
    }
}

/* ============================================================================
   VERY SMALL MOBILE DEVICES
   ============================================================================ */

@media screen and (max-width: 360px) {
    .register-form {
        padding: 16px 12px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .process-info {
        padding: 12px;
    }
    
    .process-info ol {
        font-size: 12px;
    }
}

/* ============================================
   TOOLTIP - CLICK TO SHOW FOR MOBILE
   ============================================ */

.tooltip-icon.clickable {
    cursor: pointer;
}

.tooltip-icon.clickable.active::after,
.tooltip-icon.clickable.active::before {
    opacity: 1;
    visibility: visible;
}

.tooltip-icon.clickable.active::after {
    transform: translateY(-50%) translateX(15px);
}

.tooltip-icon.clickable.active::before {
    transform: translateY(-50%) translateX(10px);
}

@media (max-width: 768px) {
    .tooltip-icon.clickable.active::after {
        transform: translateX(-50%) translateY(15px);
    }

    .tooltip-icon.clickable.active::before {
        transform: translateX(-50%) translateY(10px) rotate(90deg);
    }
}