/* style.css – improved layout with accessible sidebar */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    padding: 20px;
    font-size: 16px; /* base font size for readability */
}

.layout {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    border: 1px solid #ddd;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    font-size: 24px;
    border-bottom: 1px solid #666;
}

.main-row {
    display: flex;
    flex: 1;
}

/* ===== SIDEBAR STYLING ===== */
.sidebar {
    background-color: #f8f9fa;        /* light, neutral background */
    padding: 25px 20px;
    width: 280px;
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 5px rgba(0,0,0,0.02);
}

.sidebar h3 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
    font-weight: 600;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    display: block;
    padding: 10px 15px;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 1.1rem;                /* slightly larger for readability */
    background-color: transparent;
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    background-color: #e9ecef;
    border-left-color: #3498db;
    color: #1a252f;
}

/* Style for status messages inside sidebar */
.sidebar p.status {
    margin: 15px 0;
    padding: 8px 12px;
    background-color: #fff;
    border-radius: 4px;
    border-left: 4px solid #3498db;
    font-size: 1rem;
    color: #2c3e50;
}

.sidebar p.status.admin {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.sidebar p.status.user {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
    font-weight: 500;
}

/* Special link styling for "Logout" */
.sidebar a[href*="logout"] {
    color: #c0392b;
}

.sidebar a[href*="logout"]:hover {
    background-color: #f8d7da;
    border-left-color: #c0392b;
}

/* ===== MAIN CONTAINER ===== */
.container {
    background-color: #fff;
    padding: 25px;
    flex: 1;
    min-height: 300px;
    font-size: 1rem;
}

.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #666;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-row {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }
}

/* Empty gallery message styling */
.no-images-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ccc;
    margin: 20px 0;
}

.no-images-message .icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 15px;
    opacity: 0.8;
}

.no-images-message h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 400;
}

.no-images-message p {
    font-size: 1.2rem;
    color: #666;
}

.no-images-message a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.no-images-message a:hover {
    border-bottom-color: #3498db;
}

/* ===== FORM STYLING ===== */
.container form {
    max-width: 500px;
    margin: 20px 0;
}

.container h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.container input[type="text"],
.container input[type="password"],
.container input[type="email"],
.container textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fafafa;
}

.container input[type="text"]:focus,
.container input[type="password"]:focus,
.container input[type="email"]:focus,
.container textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
    background-color: #fff;
}

.container textarea {
    resize: vertical;
    min-height: 100px;
}

.container button,
.container input[type="submit"],
.container .button {
    background-color: #333;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.container button:hover,
.container input[type="submit"]:hover,
.container .button:hover {
    background-color: #555;
}

/* Special styling for checkbox + label */
.container label {
    display: block;
    margin-bottom: 15px;
    color: #555;
    cursor: pointer;
}

.container input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
    vertical-align: middle;
}

/* Style for the compose form specifically */
.compose-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Style for the upload form */
.container form input[type="file"] {
    width: 100%;
    padding: 10px;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
    margin-bottom: 15px;
}

.container form input[type="file"]:hover {
    border-color: #3498db;
}

/* Back link styling (used in view.php and user galleries) */
.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.back-link:hover {
    background-color: #e9ecef;
    border-left-color: #3498db;
    color: #1a252f;
}

/* Center the link if it's inside a container with text-align: center */
.container .back-link {
    margin-left: auto;
    margin-right: auto;
    display: table; /* centers block element */
}