/* NHS Design System Styling for PPU Website */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Frutiger", Arial, sans-serif;
    line-height: 1.6;
    color: #212b32;
    background: #ffffff;
    font-size: 16px;
}

/* NHS Colors */
:root {
    --nhs-blue: #005eb8;
    --nhs-dark-blue: #003087;
    --nhs-light-blue: #0072ce;
    --nhs-pale-blue: #e8edee;
    --nhs-light-grey: #f0f4f5;
    --nhs-mid-grey: #aeb7bd;
    --nhs-dark-grey: #425563;
    --nhs-green: #00a499;
    --nhs-dark-green: #007064; /* Darker green for hover */
    --nhs-red: #da291c;
    --nhs-orange: #ed8b00;
    --nhs-yellow: #ffb81c;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: white;
    color: var(--nhs-blue);
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nhs-logo, .chrysalis-logo {
    max-height: 50px;
    width: auto;
}

.header-title {
    text-align: center;
    flex: 1;
}

.header-title h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: var(--nhs-blue);
}

.header-title .subtitle {
    font-size: 16px;
    color: var(--nhs-dark-grey);
    margin: 5px 0 0 0;
    font-weight: normal;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: var(--nhs-blue);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: var(--nhs-light-grey);
}

/* Main content area */
.main-content {
    padding: 40px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* PDF Tiles */
.pdf-section h2 {
    color: var(--nhs-blue);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--nhs-blue);
    padding-bottom: 10px;
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pdf-tile {
    background: white;
    border: 2px solid var(--nhs-light-grey);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdf-tile:hover {
    border-color: var(--nhs-blue);
    box-shadow: 0 4px 12px rgba(0, 94, 184, 0.15);
    transform: translateY(-2px);
}

.pdf-icon {
    font-size: 48px;
    color: var(--nhs-blue);
    margin-bottom: 15px;
}

.pdf-tile h3 {
    color: var(--nhs-blue);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.pdf-tile p {
    color: var(--nhs-dark-grey);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.download-btn {
    background-color: rgb(204, 0, 153);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: rgb(184, 0, 138);
}

/* Contact Form */
.contact-section {
    background: var(--nhs-light-grey);
    border-radius: 4px;
    padding: 30px;
    position: sticky;
    top: 20px;
}

.contact-section h2 {
    color: var(--nhs-blue);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--nhs-blue);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--nhs-blue);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--nhs-mid-grey);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--nhs-blue);
    box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.1);
}

.form-group.error input,
.form-group.error select {
    border-color: var(--nhs-red);
}

.error-message {
    color: var(--nhs-red);
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

.required {
    color: var(--nhs-red);
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: normal;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-text {
    font-size: 14px;
    color: var(--nhs-dark-grey);
}

.checkbox-group.error .checkbox-text {
    color: var(--nhs-red);
}

.submit-btn {
    background-color: rgb(204, 0, 153);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: rgb(184, 0, 138);
}

.submit-btn:disabled {
    background: var(--nhs-mid-grey);
    cursor: not-allowed;
}

/* Login Form */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nhs-pale-blue);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logos {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.login-logos img {
    max-height: 40px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--nhs-blue);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--nhs-dark-grey);
}

/* Alert boxes */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Admin Panel */
.admin-header {
    background-color: white;
    color: var(--nhs-blue);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.admin-nav a {
    color: var(--nhs-blue);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--nhs-light-grey);
}

.admin-content {
    padding: 30px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--nhs-light-grey);
}

.data-table th {
    background-color: white;
    color: var(--nhs-blue);
    font-weight: bold;
    border-bottom: 2px solid var(--nhs-light-grey);
}

.data-table tr:hover {
    background: var(--nhs-pale-blue);
}

.admin-content .data-table td a {
    text-decoration: none;
    font-weight: bold;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-btn {
    background-color: rgb(204, 0, 153);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    border: none; /* Ensure no border is applied */
}

.admin-btn:hover {
    background-color: rgb(184, 0, 138);
}

.admin-btn .icon {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-section {
        position: static;
    }
    
    .pdf-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-container {
        order: 1;
    }
    
    .header-title {
        order: 2;
    }
    
    .header-title h1 {
        font-size: 20px;
    }
    
    .nav-links {
        order: 3;
        justify-content: center;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .pdf-tile {
        padding: 20px 15px;
    }
    
    .contact-section {
        padding: 20px;
    }
    
    .login-box {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .data-table {
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.text-blue { color: var(--nhs-blue); }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.hidden { display: none; }

/* Loading spinner */
.spinner {
    border: 3px solid var(--nhs-light-grey);
    border-top: 3px solid var(--nhs-blue);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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