/*
 * PushALink - Core Stylesheet
 * Brand Colors:
 * - Primary (Deep Blue): #003366
 * - Accent (Bright Orange/Gold): #FFA500
 * - Secondary Accent (Lighter Blue): #00BFFF
 * - Background/Dark: #1a1a1a
 */

/* ======================================================================
   1. RESET & BASE
   ====================================================================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    background-color: #f5f5f5;
    /* Light grey background */
    color: #333;
}

/* Main content container style (used by base.html's <main> tag) */
main {
    display: block;
    padding: 0;
    /* This calculation is often unreliable; best practice is to manage height via content flow, 
       but kept here based on previous input: */
    min-height: calc(100vh - 40px - 56px);
}

/* ======================================================================
   2. HEADER & NAVIGATION
   ====================================================================== */
header {
    background-color: #000000;
    /* Darker header background to make logo pop */
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
}

.header-logo {
    height: 40px;
    width: auto;
}

.header-logo img {
    height: 100%;
    width: auto;
    display: block;
}

header nav a {
    color: #fff;
    margin-left: 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #FFA500;
    /* Accent Orange on hover */
}

/* ======================================================================
   3. HOME PAGE SECTIONS
   ====================================================================== */

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 2rem;
    /* Gradient: Deep Blue to Accent Orange */
    background: linear-gradient(135deg, #003366, #FFA500);
    color: #fff;
    border-radius: 0 0 20px 20px;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Process Flow Section */
.process-flow {
    max-width: 1000px;
    margin: 2rem auto 4rem auto;
    padding: 2rem;
}

.flow-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1rem;
}

.flow-step {
    background-color: #fff;
    padding: 1.5rem;
    /* Increased padding */
    border-radius: 8px;
    flex: 1 1 200px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Stronger shadow */
    text-align: center;
    border-top: 3px solid #003366;
    /* Primary brand color emphasis */
    transition: transform 0.3s ease;
}

.flow-step:hover {
    transform: translateY(-5px);
}


/* ======================================================================
   4. DASHBOARD LAYOUT (2 Columns)
   ====================================================================== */

.dashboard-container {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
    align-items: flex-start;
}

.dashboard-sidebar {
    flex: 0 0 250px;
    /* Fixed width for the sidebar */
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-main-content {
    flex: 1;
    /* Take up remaining space */
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    min-height: 70vh;
}

/* API Key List Styling */
.dashboard-sidebar h3,
.dashboard-sidebar h4 {
    color: #003366;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

.dashboard-sidebar .api-key-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.dashboard-sidebar .api-key-list li {
    padding: 0.75rem 0.5rem;
    margin: 0.25rem 0;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
    font-size: 0.95rem;
    border-radius: 4px;
}

.dashboard-sidebar .api-key-list li:hover {
    background-color: #f0f0f0;
}

.dashboard-sidebar .api-key-list li.active {
    background-color: #e6f7ff;
    /* Lighter blue background */
    border-left-color: #003366;
    /* Primary brand color indicator */
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 51, 102, 0.1);
}

/* Removed redundant .api-keys styling here as it is replaced by dashboard-sidebar */


/* ======================================================================
   5. FORMS & BUTTONS (General)
   ====================================================================== */
form input,
form button {
    padding: 0.5rem;
    margin: 0.25rem 0;
    width: 100%;
    /* Make general form elements full width */
    box-sizing: border-box;
}

form button {
    background-color: #003366;
    /* Primary brand color for general buttons */
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #FFA500;
    /* Accent color on hover */
    color: #1a1a1a;
}

/* ======================================================================
   6. AUTHENTICATION FORMS (Login/Register)
   ====================================================================== */

.auth-container {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
    text-align: center;
}

.auth-container h1 {
    color: #003366;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
}

.auth-container p {
    margin-top: 1.5rem;
    color: #666;
}

.auth-container p a {
    color: #003366;
    text-decoration: none;
    font-weight: bold;
}

.auth-container p a:hover {
    text-decoration: underline;
    color: #FFA500;
}

.auth-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.auth-container form label {
    font-weight: bold;
    color: #555;
    margin-bottom: -0.5rem;
}

.auth-container form input[type="email"],
.auth-container form input[type="password"],
.auth-container form input[type="text"] {
    width: 100%;
    /* Already set to 100% via the general form input rule */
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box;
}

.auth-container form input:focus {
    border-color: #00BFFF;
    /* Secondary Accent Blue focus */
    outline: none;
    box-shadow: 0 0 5px rgba(0, 191, 255, 0.5);
}

.auth-container form button[type="submit"] {
    background-color: #003366;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 1.5rem;
}

.auth-container form button[type="submit"]:hover {
    background-color: #FFA500;
    color: #1a1a1a;
}

/* Checkbox and Forgot Password Link */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.form-options input[type="checkbox"] {
    margin-right: 0.5rem;
}

.form-options label {
    font-weight: normal;
    color: #666;
    margin-bottom: 0;
}

.form-options a {
    color: #003366;
    text-decoration: none;
}

.form-options a:hover {
    text-decoration: underline;
    color: #FFA500;
}

/* ======================================================================
   7. RESPONSIVE MEDIA QUERIES
   ====================================================================== */

/* Adjustments for larger mobile/small tablet screens */
@media (max-width: 768px) {

    /* Dashboard: stack columns vertically */
    .dashboard-container {
        flex-direction: column;
        padding: 0 1rem;
    }

    .dashboard-sidebar {
        flex: 1 1 100%;
        margin-bottom: 1rem;
    }

    /* General forms/auth */
    .auth-container {
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 0;
        box-shadow: none;
    }
}

/* Adjustments for smaller mobile screens */
@media (max-width: 600px) {

    /* Header/Nav adjustment */
    header {
        flex-direction: column;
        padding: 1rem;
    }

    header nav {
        margin-top: 0.5rem;
    }

    header nav a {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    /* Home Page */
    .flow-container {
        flex-direction: column;
    }

    .hero {
        padding: 4rem 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}


/* ======================================================================
   8. DASHBOARD MESSAGES & PAGINATION
   ====================================================================== */
.message-card {
    border-left: 4px solid #003366;
    background-color: #fdfdfd;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.message-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.message-card h4 {
    color: #003366;
    margin: 0 0 0.5rem 0;
}

.message-card p {
    margin: 0 0 0.5rem 0;
    color: #444;
}

.message-card small {
    color: #666;
    font-size: 0.85rem;
}

.pagination-controls {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    gap: 0.5rem;
}

.pagination-controls button {
    background-color: #003366;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-controls button:hover {
    background-color: #FFA500;
    color: #1a1a1a;
}

.pagination-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


/* ======================================================================
   9. FOOTER
   ====================================================================== */
footer {
    /* Base Container Style */
    width: 100%;
    /* Ensure it spans full width */
    background-color: #ffffff;
    /* White card background */
    color: #555;
    /* Medium grey text color */
    text-align: center;
    /* Center all content */
    padding: 1rem 0;
    /* Vertical padding (adjust this instead of height) */
    box-sizing: border-box;
    /* Include padding in the element's total height */
    margin-top: 2rem;
    /* Add some space above the footer */
    border-top: 1px solid #ddd;
    /* Subtle top border for separation */
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

footer a {
    color: #003366;
    /* Primary brand color for links */
    text-decoration: none;
    font-weight: 500;
    padding: 0 0.5rem;
    /* Spacing for pipe-separated links */
    transition: color 0.3s ease;
}

footer a:hover {
    color: #FFA500;
    /* Accent color on hover */
    text-decoration: underline;
}

/* Specific styling for the Adaptiveware link inside the paragraph */
footer p a {
    font-weight: bold;
}

/* Style to ensure the pipe separator (if used in HTML, but here we style the link spacing) */
footer a:first-of-type {
    padding-left: 0;
}


.centered-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    line-height: 1.7;
    font-size: 1rem;
    color: #333;
}

.centered-container h1,
.centered-container h2,
.centered-container h3 {
    text-align: center;
    margin-bottom: 1.2em;
    color: #222;
}

.centered-container p {
    margin-bottom: 1.2em;
}

.centered-container a {
    color: #0078ff;
    text-decoration: none;
}

.centered-container a:hover {
    text-decoration: underline;
}

.meta {
    background-color: #f8f9fb;
    border-left: 4px solid #0078ff;
    /* your brand accent */
    padding: 15px 20px;
    margin: 20px 0 40px 0;
    font-size: 0.95rem;
    color: #555;
    border-radius: 8px;
    line-height: 1.6;
}

.meta strong {
    color: #222;
}

/*
 * PushALink - API Documentation Specific Styles
 */

/* Base Container for the Documentation */
.api-docs-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
    color: #333;
}

/* Documentation Heading Styles */
.api-docs-container h2 {
    color: #003366;
    /* Primary Deep Blue */
    border-bottom: 2px solid #FFA500;
    /* Accent Orange divider */
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    font-size: 1.8rem;
}

.api-docs-container h3 {
    color: #1a1a1a;
    /* Darker heading */
    margin-top: 1.5rem;
    font-size: 1.4rem;
}

/* Endpoint Card/Block */
.endpoint-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Endpoint Header (Method + Path) */
.endpoint-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f7f7f7;
    border-bottom: 1px solid #eee;
}

.endpoint-method {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 1rem;
    min-width: 65px;
    text-align: center;
}

/* Color-coding HTTP methods */
.method-POST {
    background-color: #28a745;
}

/* Green for data creation */
.method-GET {
    background-color: #00BFFF;
}

/* Secondary Accent Lighter Blue for data retrieval */

.endpoint-path {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    color: #003366;
    /* Primary Deep Blue */
    font-weight: 500;
}

/* Code/Integration Examples */
.code-example {
    background-color: #1a1a1a;
    /* Background/Dark */
    color: #f8f8f2;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    border-radius: 0 0 8px 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Tables for Schemas/Parameters */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.api-table th,
.api-table td {
    border: 1px solid #eee;
    padding: 0.75rem 1rem;
    text-align: left;
}

.api-table th {
    background-color: #003366;
    /* Deep Blue header */
    color: #fff;
    font-weight: bold;
    border-color: #003366;
}

/* Table Cell for the API Key */
.api-key-cell {
    font-family: 'Courier New', Courier, monospace;
    color: #FFA500;
    /* Accent Orange */
    font-weight: bold;
}