/*------------------------------------------------------------------
    File Name: resources-responsive.css
    Custom Responsive Fixes for Password-Protected Resources Page
-------------------------------------------------------------------*/

.resources-page-wrapper,
body:not(.clinic_version) .section,
.auth-container,
.resources-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 auto;
}

/* Pushes main body content down below the header */
.resource-wrapper {
    padding-top: 180px;
    padding-bottom: 50px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

/* Style for the Login Card */
.login-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
}

.login-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333333;
    text-align: center;
}

.login-card input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-card input[type="submit"] {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

.login-card input[type="submit"]:hover {
    background-color: #0056b3;
}

.login-card .error {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
}

/* Style for Protected Content Container with Sidebar Layout */
.vault-container {
    width: 100%;
    max-width: 1200px;
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    box-sizing: border-box;
    margin: 0 15px;
    z-index: 11;
}

.vault-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.vault-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333333;
}

.logout-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1;
}

.logout-btn:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

/* Vertical Navigation Menu / Sidebar */
.vault-sidebar {
    flex: 1;
    min-width: 220px;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
}

.vault-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vault-sidebar ul li {
    margin-bottom: 8px;
}

.vault-sidebar ul li a {
    display: block;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

.vault-sidebar ul li a:hover {
    background: #e2e6ea;
    color: #007bff;
    text-decoration: none;
}

.vault-sidebar ul li a.active-tab {
    background: #007bff;
    color: white;
}

/* Main Content Display Area */
.vault-content {
    flex: 3;
    min-width: 280px;
    padding: 5px 15px;
    box-sizing: border-box;
    overflow-x: auto;
}

.vault-content h3 {
    margin-top: 0;
    color: #333333;
}

/* Responsive Table Adjustments */
.table-responsive-custom {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vault-content table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
    background-color: transparent;
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
    .resource-wrapper {
        padding-top: 140px;
    }

    .vault-container {
        flex-direction: column;
        padding: 15px;
        margin: 0 10px;
    }

    .vault-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .vault-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .vault-sidebar ul li {
        flex: 1;
        min-width: 120px;
        margin-bottom: 0;
    }

    .vault-sidebar ul li a {
        text-align: center;
        padding: 8px 10px;
        font-size: 13px;
    }

    .vault-content {
        width: 100%;
        padding: 5px 0;
    }

    .vault-header h1 {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .vault-sidebar ul {
        flex-direction: column;
    }

    .vault-sidebar ul li {
        width: 100%;
    }
}