/* --- General Branding for listmonk public pages --- */

/* 1. Global styles and variables from your site */
:root {
    --color-main: #9FBA5D;
    --color-accent: #564CFF;
    --color-accent-hover: #4a41e0;
    --color-background: #F4F4F6;
    --color-input-background: #EDEDED;
    --color-text: #000;
    --color-text-light: #848484;
    --border-radius: 15px;
    --border-radius-large: 25px;
    --border-radius-buttons: 35px;
}

html, body {
    font-family: Manrope, sans-serif;
    color: var(--color-text);
    background-color: #fff;
    font-size: 16px;
    line-height: 1.5;
}

/* 2. Layout & Container */
.container.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

header.header {
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

section {
    background: var(--color-background);
    border-radius: var(--border-radius-large);
    padding: 40px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* 3. Typography */
h2 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    margin: 0 0 35px 0;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

p, li {
    font-size: 18px;
}

/* 4. Forms (Inputs, Labels, Buttons) */
.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form label {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"] {
    background: var(--color-input-background);
    font-size: 18px;
    font-family: Manrope, sans-serif;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    outline: none !important;
    padding: 0 25px;
    width: 100%;
    height: 60px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form input[type="text"]:focus,
.form input[type="email"]:focus,
.form input[type="password"]:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(86, 76, 255, 0.2);
}

.form input::placeholder {
    color: var(--color-text-light);
    opacity: 1;
}

button.button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    padding: 0 40px;
    color: #fff !important;
    border-radius: var(--border-radius-buttons);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    border: none;
    cursor: pointer;
    line-height: 60px;
    height: 60px;
    margin: 0;
    transition: background-color .3s;
    text-decoration: none;
    width: 100%; /* Full width for consistency */
}

button.button:hover, .button:hover {
    background-color: var(--color-accent-hover);
    text-decoration: none;
}

p.submit, .form p:has(> button) {
    margin-top: 15px;
}

/* 5. Mailing list checkboxes styling */
ul.lists {
    list-style: none;
    padding: 0;
    margin: 25px 0 0 0;
}

ul.lists h2 {
    font-size: 20px;
    text-align: left;
    margin-bottom: 15px;
}

ul.lists li {
    display: block;
    position: relative;
    padding: 0 0 0 35px;
    margin-bottom: 15px;
}

ul.lists li label {
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.4;
}

ul.lists li .description {
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 4px;
}

ul.lists li input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

ul.lists li label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background: var(--color-input-background);
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: all 0.2s;
}

ul.lists li input[type="checkbox"]:checked+label::before {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

ul.lists li input[type="checkbox"]:checked+label::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 6. Archive page styling */
ul.archive {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.archive li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

ul.archive li:first-child {
    border-top: 1px solid #e0e0e0;
}

ul.archive li a {
    font-weight: 500;
    font-size: 18px;
    color: var(--color-text);
}

ul.archive li a:hover {
    color: var(--color-accent);
}

ul.archive li .date {
    color: var(--color-text-light);
    font-size: 14px;
    white-space: nowrap;
}


/* 7. Footer: Remove "Powered by listmonk" and add custom text */
footer.container {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-light);
    font-size: 14px;
    /* Hide the original "Powered by listmonk" text */
    visibility: hidden;
    position: relative;
}

footer.container::before {
    /* Add your custom copyright or text here */
    content: "© 2025 iClobot. Все права защищены.";
    visibility: visible;
    position: absolute;
    left: 0;
    right: 0;
    top: 40px;
}

footer.container a[href*="listmonk.app"] {
    display: none !important;
}


/* 8. Responsive styles for mobile */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .container.wrap {
        padding: 15px;
    }

    section {
        padding: 25px;
    }

    h2 {
        font-size: 30px;
    }

    p, li, .form label, .form input, button.button, ul.lists li label {
        font-size: 16px;
    }

    .form input[type="text"],
    .form input[type="email"],
    .form input[type="password"] {
        height: 50px;
        padding: 0 20px;
    }
    
    button.button, .button {
        height: 50px;
        line-height: 50px;
    }
}