/*
 * Basic styles for the simple Gmail‑like email application.
 * The design intentionally keeps things clean and minimal.
 */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/*
 * Theme variables
 *
 * The default colour palette and typography can be overridden by
 * specifying CSS variables on the :root element via inline <style>
 * tags injected from PHP.  See admin/settings.php for how the
 * administrator can customise primary/secondary colours and fonts.
 */

:root {
    --primary-color: #4285f4;
    --primary-hover: #3367d6;
    --secondary-color: #e0e0e0;
    --secondary-hover: #d5d5d5;
    --font-family: 'Roboto', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #222;
}

.container {
    max-width: 420px;
    margin: 60px auto;
    background: #fff;
    border-radius: 8px;
    padding: 30px 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

h1, h2 {
    margin: 0 0 20px 0;
    font-weight: 400;
    color: #333;
}

form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    color: #fff;
    background: var(--primary-color);
    margin-right: 8px;
    margin-top: 12px;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #555;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.error {
    background: #fbeaea;
    color: #b71c1c;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    border: 1px solid #f2c1c1;
}

.success {
    background: #eaf6f2;
    color: #1b5e20;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    border: 1px solid #c1e3d3;
}

/* Registration wizard steps */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

/* Navigation bar for logged‑in pages */
.navbar {
    background: var(--primary-color);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    font-size: 14px;
}

.navbar a:hover {
    text-decoration: underline;
}

/* Inbox table */
.mail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.mail-table th,
.mail-table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.mail-table tr:hover {
    background: #f0f7ff;
}

.mail-table th {
    background: #fafafa;
    font-weight: 500;
    border-bottom: 2px solid #eee;
}

.search-bar {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-bar button {
    padding: 8px 16px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-bar button:hover {
    background: var(--primary-hover);
}

/* Compose form */
.compose-form label {
    font-weight: 500;
}

.compose-form input[type="text"],
.compose-form input[type="email"],
.compose-form textarea {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.compose-form textarea {
    min-height: 120px;
    resize: vertical;
}

.message-view {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 20px auto;
    max-width: 800px;
}