/**
 * Midway Auth App Styles
 * Clean, modern design with accessibility in mind
 */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    line-height: 1.6;
}

/* Container */
.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 48px 40px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

/* Typography */
h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 16px;
    font-weight: 600;
}

h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.subtitle {
    color: #666;
    font-size: 16px;
    margin-bottom: 32px;
}

.text-success {
    color: #10b981;
}

.text-error {
    color: #ef4444;
}

/* Buttons */
.btn {
    border: none;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #dc3545;
    color: white;
    margin-top: 16px;
}

.btn-secondary:hover {
    background: #c82333;
}

/* Status Messages */
.status {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 16px 0;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #721c24;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    word-break: break-word;
    text-align: left;
}

/* User Info Section */
.user-section {
    margin-top: 20px;
}

.user-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
}

.value {
    color: #333;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    text-align: right;
}

/* Info Box */
.info-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 32px;
    text-align: left;
}

.info-box p {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 24px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 32px 24px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .value {
        text-align: left;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none;
    }
    
    .spinner {
        animation: none;
        border-top-color: #667eea;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .status {
        border-width: 2px;
    }
}
