﻿/* HSSE Portal Login Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0c1a2e;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

.login-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* Background Animation */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float var(--duration, 10s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    z-index: 1;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.1;
    }

    25% {
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.2;
    }

    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.15;
    }

    75% {
        transform: translateY(-30px) rotate(270deg);
        opacity: 0.2;
    }
}

/* Main Layout */
.login-container .row {
    width: 100%;
    max-width: none;
    margin: 0;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    backdrop-filter: none;
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* Branding Section - MODIFIED: 70% width with background image */
.branding-section {
    background: url('/assets/images/background.png') center center / cover no-repeat;
    position: relative;
    color: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 70% !important;
    max-width: 70% !important;
    min-height: 100vh;
}

    /* No overlay - keep background as is */
    .branding-section::before {
        display: none;
    }

.branding-content {
    padding: 3rem;
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.logo-container {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.logo-icon {
    width: 100px;
    height: 100px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-icon i {
        font-size: 2.5rem;
        color: white;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 184, 148, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 35px rgba(0, 184, 148, 0.4);
    }
}

.logo-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* ============================================
   FORM SECTION - MODIFIED: 30% width
   ============================================ */

.form-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
    flex: 0 0 30% !important;
    max-width: 30% !important;
}

.form-container {
    width: 100%;
    max-width: 380px;
    padding: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .form-header h2 {
        font-size: 2rem;
        font-weight: 700;
        color: var(--gray-900);
        margin-bottom: 0.5rem;
    }

    .form-header p {
        color: var(--gray-600);
        font-size: 1rem;
    }

    /* Logo in Form Header */
    .form-header .logo-container {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .form-header .login-logo {
        max-width: 150px;
        height: auto;
        display: inline-block;
        animation: logoFadeIn 0.6s ease-in-out;
        object-fit: contain;
    }

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styles */
.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

    .form-label i {
        color: var(--primary-blue);
        width: 16px;
    }

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: white;
    transition: all 0.3s ease;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
        background: white;
    }

    .form-control::placeholder {
        color: var(--gray-400);
    }

/* Password Input Container */
.password-input {
    position: relative;
    width: 100%;
}

    .password-input .form-control {
        padding-right: 3rem;
    }

.password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: none;
    border: none;
    padding: 0 1rem;
    color: var(--gray-400);
    cursor: pointer;
    z-index: 3;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
}

    .password-toggle:hover {
        color: var(--primary-blue);
    }

    .password-toggle:focus {
        outline: none;
        color: var(--primary-blue);
    }

.input-group {
    width: 100%;
    display: flex;
    position: relative;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

    .form-check-input:checked {
        background-color: var(--primary-blue);
        border-color: var(--primary-blue);
    }

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
    user-select: none;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn-login:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 184, 148, 0.3);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.8;
        cursor: not-allowed;
        transform: none;
    }

    .btn-login .loading-spinner {
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Forgot Password Link */
.forgot-password-section {
    text-align: center;
}

.forgot-password-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

    .forgot-password-link:hover {
        color: var(--primary-blue);
        background: rgba(9, 132, 227, 0.1);
        text-decoration: none;
        transform: translateY(-1px);
    }

    .forgot-password-link i {
        color: var(--primary-blue);
        flex-shrink: 0;
    }

/* Footer Links */
.footer-links {
    margin-top: 2rem;
    text-align: center;
}

/* Validation */
.text-danger {
    color: var(--primary-red) !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .video-container {
        max-width: 480px;
    }

    .branding-content {
        padding: 2rem;
    }
}

@media (max-width: 991.98px) {
    .login-container .row {
        margin: 1rem;
        min-height: auto;
    }

    .branding-section {
        display: none;
    }

    .form-section {
        padding: 2rem 1rem;
    }

    .form-container {
        padding: 1rem;
    }

    .form-header h2 {
        font-size: 1.75rem;
    }

    .video-container,
    .video-modal {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .form-header .login-logo {
        max-width: 120px;
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 1rem;
    }

    .form-container {
        padding: 0;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .logo-text h1 {
        font-size: 2rem;
    }

    .form-header .login-logo {
        max-width: 100px;
    }
}

/* ============================================
   SHARE MODAL STYLES
   ============================================ */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

    .share-modal.active {
        display: flex;
    }

.share-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.share-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #1e293b;
    border-radius: 16px;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    color: white;
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .share-modal-header h4 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
    }

        .share-modal-header h4 i {
            color: #00B894;
        }

.share-close-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .share-close-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.share-modal-body {
    padding: 1.5rem;
}

/* Link Section */
.share-link-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.share-link-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 184, 148, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .share-link-icon i {
        color: #00B894;
        font-size: 1.1rem;
    }

.share-link-info {
    flex: 1;
    min-width: 0;
}

.share-link-title {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.share-link-url {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-link-btn {
    width: 44px;
    height: 44px;
    background: #00B894;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .copy-link-btn:hover {
        background: #00a884;
        transform: scale(1.05);
    }

/* QR Code Section */
.qr-code-section {
    text-align: center;
}

.qr-label {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.qr-code-container {
    display: inline-flex;
    padding: 1rem;
    background: white;
    border-radius: 12px;
}

    .qr-code-container img {
        display: block;
    }
