/**
 * Authentication Pages Styles
 * Štýly pre prihlásenie a registráciu
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* === REGISTRATION CONTAINER === */
.register-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.register-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    margin: 20px auto;
}

/* === LOGO SECTION === */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-section .logo-link {
    display: inline-block;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.logo-section .logo-link:hover {
    transform: scale(1.05);
}

.logo-section .logo {
    height: 180px !important;
    width: auto !important;
    margin-bottom: 25px;
    cursor: pointer;
}

.register-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.register-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 30px;
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-label .required {
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.error {
    border-color: #e74c3c;
}

.form-control.success {
    border-color: #27ae60;
}

/* === PASSWORD INPUT === */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
    transition: color 0.2s ease;
    user-select: none;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle:active {
    color: #3498db;
}

.eye-icon {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease;
}

.eye-closed {
    display: block;
}

.eye-open {
    display: none;
}

.password-toggle.showing .eye-closed {
    display: none;
}

.password-toggle.showing .eye-open {
    display: block;
}

/* === PASSWORD STRENGTH === */
.password-strength {
    margin-top: 8px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    background: #e74c3c;
    width: 25%;
}

.strength-fill.fair {
    background: #f39c12;
    width: 50%;
}

.strength-fill.good {
    background: #f1c40f;
    width: 75%;
}

.strength-fill.strong {
    background: #27ae60;
    width: 100%;
}

.strength-text {
    font-size: 12px;
    color: #666;
}

/* === CHECKBOX === */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: #3498db;
}

.checkbox-label {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.checkbox-label a {
    color: #3498db;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* === SUBMIT BUTTON === */
.btn-register {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
    position: relative;
}

.btn-register:hover {
    background: #2980b9;
}

.btn-register:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-register .btn-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* === LOGIN LINK === */
.login-link {
    text-align: center;
    margin-bottom: 30px;
}

.login-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

.login-link a:hover {
    text-decoration: underline;
}

/* === FOOTER LINKS === */
.footer-links {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    font-size: 12px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* === ERROR MESSAGES === */
.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.error-message.show {
    display: block;
}

/* === FLASH MESSAGES === */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    position: relative;
}

.flash-message.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-message.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-message.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.flash-message.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}

/* === COUNTRY SELECT WITH FLAGS === */
.country-select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M1.5 0L6 4.5L10.5 0L12 1.5L6 7.5L0 1.5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid #ddd;
}

.country-select option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    min-height: 40px;
}

/* Custom country dropdown styling */
.country-dropdown {
    position: relative;
}

.country-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.country-dropdown-toggle:hover {
    border-color: #3498db;
}

.country-dropdown-toggle.open {
    border-color: #3498db;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.selected-country {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown-arrow.rotated {
    transform: rotate(180deg);
}

.country-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #3498db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.country-dropdown-menu.show {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.country-option:hover {
    background-color: #f8f9fa;
}

.country-option.selected {
    background-color: #e3f2fd;
}

.country-search {
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #e1e5e9;
    outline: none;
    width: 100%;
    font-size: 14px;
}

/* === COUNTRY SELECT === */
.form-control option {
    padding: 8px;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .register-container {
        padding: 10px;
    }
    
    .register-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .register-title {
        font-size: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .register-card {
        padding: 20px 15px;
    }
    
    .form-control {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-register {
        padding: 12px 18px;
        font-size: 14px;
    }
}