/* styles.css - Styles for the Threadmancer project */

/* Reset some default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #EEEDFE;
    color: #1e1a3a;
}

/* Container for the main content */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

/* Header styles */
header {
    background: #3C3489;
    color: #ffffff;
    padding: 2px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Navigation bar styles */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #3C3489;
    padding: 0 20px;
}

nav .nav-links {
    display: flex;
    list-style: none;
}

nav a {
    color: #ffffff;
    padding: 15px 20px;
    text-decoration: none;
    text-align: center;
}

nav a:hover {
    background: #534AB7;
}

nav a.active {
    background: #534AB7;
    border-bottom: 2px solid #CECBF6;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    padding: 6px 0;
    flex-shrink: 0;
}

.nav-logo {
    height: 40px;
    width: auto;
    display: block;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

#user-logged-in {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: .9em;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.nav-login-btn {
    background: #534AB7;
    padding: 8px 16px !important;
    border-radius: 4px;
    font-size: .9em;
    white-space: nowrap;
}

.nav-login-btn:hover {
    background: #3C3489;
}

.nav-logout-btn {
    opacity: .7;
    font-size: .85em;
    padding: 8px 12px !important;
}

.nav-logout-btn:hover {
    opacity: 1;
}

.nav-privacy-link {
    opacity: .6;
    font-size: .85em;
    padding: 8px 12px !important;
}

.nav-privacy-link:hover {
    opacity: 1;
}

/* Main content styles */
main {
    padding: 20px;
}

/* Campaign subheader bar */
.campaign-bar {
    background: #fff;
    border-bottom: 1px solid #CECBF6;
    box-shadow: 0 2px 10px rgba(60, 52, 137, 0.08);
}
.campaign-display {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 14px 28px;
    gap: 20px;
    min-height: 58px;
}
.campaign-display-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}
.campaign-bar-name {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Garamond, serif;
    font-size: 1.45em;
    font-weight: 700;
    color: #3C3489;
    letter-spacing: 0.01em;
    text-align: center;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.campaign-bar-btn {
    background: #EEEDFE;
    border: 1px solid #AFA9EC;
    color: #3C3489;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85em;
    font-family: inherit;
    font-weight: 500;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.campaign-bar-btn:hover {
    background: #CECBF6;
    border-color: #7F77DD;
}
.campaign-bar-remove {
    background: transparent;
    border: 1px solid #CECBF6;
    color: #AFA9EC;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .9em;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
}
.campaign-bar-remove:hover {
    background: #EEEDFE;
    border-color: #AFA9EC;
    color: #3C3489;
}
.campaign-picker {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    min-height: 58px;
}
.campaign-picker-label {
    font-size: .72em;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #AFA9EC;
    font-weight: 600;
    white-space: nowrap;
}
.campaign-bar .campaign-select {
    min-width: 260px;
}

/* No-campaign empty states */
.no-campaign-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 24px;
    text-align: center;
    background: #fff;
}
.ncs-arrow {
    font-size: 2.4em;
    color: #CECBF6;
    display: block;
    animation: ncs-float 2s ease-in-out infinite;
}
@keyframes ncs-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}
.ncs-msg {
    font-size: 1em;
    color: #AFA9EC;
    margin: 0;
    max-width: 280px;
    line-height: 1.5;
}
.ncs-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #EEEDFE;
    border: 1px solid #CECBF6;
    border-radius: 6px;
    color: #534AB7;
    font-size: .9em;
    margin-bottom: 20px;
}

/* "+ New" button in campaign picker */
.campaign-new-btn {
    background: #3C3489;
    border: none;
    color: #fff;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .85em;
    font-family: inherit;
    font-weight: 500;
    white-space: nowrap;
    transition: background .15s;
}
.campaign-new-btn:hover { background: #534AB7; }

/* New campaign modal */
.nc-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 26, 58, 0.45);
    backdrop-filter: blur(2px);
}
.nc-box {
    position: relative;
    background: #fff;
    border: 1px solid #CECBF6;
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(60, 52, 137, 0.18);
    padding: 28px 32px;
    width: 100%;
    max-width: 420px;
    z-index: 1;
}
.nc-title {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, Garamond, serif;
    font-size: 1.4em;
    color: #3C3489;
    margin: 0 0 20px;
}
.nc-field {
    margin-bottom: 14px;
}
.nc-field label {
    display: block;
    font-size: .82em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #534AB7;
    margin-bottom: 5px;
}
.nc-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #AFA9EC;
}
.nc-field input, .nc-field select {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid #CECBF6;
    border-radius: 6px;
    font-size: .95em;
    font-family: inherit;
    color: #1e1a3a;
    background: #fff;
    transition: border-color .15s;
}
.nc-field input:focus, .nc-field select:focus {
    outline: none;
    border-color: #7F77DD;
}
.nc-error {
    color: #c0392b;
    font-size: .85em;
    margin: 0 0 12px;
}
.nc-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}
.nc-btn-cancel {
    background: transparent;
    border: 1px solid #CECBF6;
    color: #534AB7;
    padding: 7px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9em;
    font-family: inherit;
    transition: background .15s;
}
.nc-btn-cancel:hover { background: #EEEDFE; }
.nc-btn-submit {
    background: #3C3489;
    border: none;
    color: #fff;
    padding: 7px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9em;
    font-family: inherit;
    font-weight: 500;
    transition: background .15s;
}
.nc-btn-submit:hover { background: #534AB7; }
.nc-btn-submit:disabled { opacity: .55; cursor: not-allowed; }

/* Shared campaign selector */
.campaign-select {
    padding: 8px 12px;
    border: 1px solid #AFA9EC;
    border-radius: 4px;
    font-size: .95em;
    background: #fff;
    color: #1e1a3a;
    font-family: inherit;
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    padding: 10px 8px;
    flex-shrink: 0;
}

/* Collapsible wrapper — visible as flex row on desktop */
.nav-collapse {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-between;
}

/* Responsive styles */
@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        padding: 0 12px;
    }

    .nav-hamburger {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .nav-collapse {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding-bottom: 8px;
    }

    .nav-collapse.open {
        display: flex;
    }

    nav .nav-links {
        flex-direction: column;
        width: 100%;
    }

    nav .nav-links li {
        width: 100%;
    }

    nav a {
        padding: 10px 12px;
        display: block;
    }

    .nav-user {
        width: 100%;
        padding: 8px 12px;
        border-top: 1px solid rgba(255, 255, 255, .15);
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-logo-link {
        padding: 8px 0;
    }
}
