/* ===== PASSWORD RESET PAGE - STYLING ===== */
/* Matchar designen från invite.html */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
}

.reset-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

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

.reset-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.reset-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.reset-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.reset-content {
    padding: 40px 30px;
}

/* ===== LOADING STATE ===== */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #666;
    font-size: 15px;
}

/* ===== MEDDELANDEN ===== */
.error-message {
    background: #fee;
    border-left: 4px solid #dc3545;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #721c24;
}

.error-message strong {
    display: block;
    margin-bottom: 5px;
}

.success-message {
    background: #d4edda;
    border-left: 4px solid #28a745;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #155724;
}

.success-message strong {
    display: block;
    margin-bottom: 5px;
}

.info-box {
    background: #e6f3ff;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.info-box p {
    margin: 5px 0;
    color: #333;
}

.info-box strong {
    color: #667eea;
}

.info-box ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.info-box li {
    margin: 5px 0;
    color: #555;
}

.info-text {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ===== FORMULÄR ===== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    font-family: inherit;
}

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

.form-group input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* ===== LÖSENORDSFÄLT MED VISA/DÖLJ-KNAPP ===== */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 6px;
    z-index: 10;
}

.toggle-password:hover {
    background: rgba(102, 126, 234, 0.1);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.eye-icon {
    font-size: 1.3em;
    line-height: 1;
    user-select: none;
}

.password-requirements {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    line-height: 1.4;
}

/* ===== KNAPPAR ===== */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* ===== TILLBAKA-LÄNK ===== */
.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== RESPONSIV DESIGN ===== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .reset-container {
        border-radius: 10px;
    }

    .reset-header {
        padding: 30px 20px;
    }

    .reset-header h1 {
        font-size: 24px;
    }

    .reset-content {
        padding: 30px 20px;
    }

    .form-group input {
        font-size: 16px; /* Förhindra zoom på iOS */
    }

    .btn {
        padding: 12px;
        font-size: 15px;
    }

    .password-input-wrapper input {
        padding-right: 45px;
    }

    .toggle-password {
        right: 8px;
        padding: 6px;
    }

    .eye-icon {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .reset-header h1 {
        font-size: 22px;
    }

    .reset-header p {
        font-size: 14px;
    }

    .reset-content {
        padding: 25px 15px;
    }
}

/* ===== ANIMATIONER ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.error-message,
.success-message,
.info-box {
    animation: fadeIn 0.3s ease-out;
}