:root {
    --solved-grey: #5c5d5d;
    --solved-blue: #89c4d9;
    --background: #f7f7f7;
    --card-background: #ffffff;
    --border: #dddddd;
    --secondary-text: #777777;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--background);
    color: var(--solved-grey);
}

.hidden {
    display: none !important;
}


/* Main layout */

.app-container {
    width: 90%;
    max-width: 850px;
    margin: 0 auto;
    padding: 60px 30px 40px;
}

.app-header {
    text-align: center;
    margin-bottom: 35px;
}

#header-logo,
.small-header-logo {
    display: block;
    width: 300px;
    max-width: 70%;
    height: auto;
    margin: 0 auto 30px;
}

.app-header h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 700;
    color: var(--solved-grey);
}

.subtitle {
    margin: 8px 0 0;
    font-size: 22px;
    color: var(--secondary-text);
}


/* Main action */

button {
    font: inherit;
    cursor: pointer;
}

.primary-button {
    border: none;
    border-radius: 10px;
    background-color: var(--solved-blue);
    color: white;
    font-size: 20px;
    font-weight: 600;
    padding: 15px 28px;
    min-width: 180px;
}

#import-backup-button {
    margin-left: 12px;
}

.primary-button:active {
    opacity: 0.8;
}


/* Binder library */

#binder-library {
    width: 100%;
    background-color: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

#binder-list {
    width: 100%;
}

#binder-list > div {
    position: relative;
    padding: 18px 220px 18px 22px;
    min-height: 78px;
    border-bottom: 1px solid var(--border);
}

#binder-list > div:last-child {
    border-bottom: none;
}

.binder-name {
    margin-bottom: 6px;
    color: var(--solved-grey);
    font-size: 20px;
    font-weight: 700;
}

.binder-actions {
    position: absolute;
    right: 22px;
    top: 20px;
    display: flex;
    gap: 10px;
}

.binder-actions button {
    border: 1px solid var(--solved-blue);
    border-radius: 8px;
    background: white;
    color: var(--solved-grey);
    padding: 9px 14px;
    font-size: 15px;
    font-weight: 600;
}

.binder-actions button:active {
    background: var(--solved-blue);
    color: white;
}

#binder-list > div > div {
    color: var(--secondary-text);
    font-size: 14px;
}


/* Footer */

.app-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
}

#footer-logo {
    width: 360px;
    max-width: 80%;
    height: auto;
}


/* New plan screen */

.new-plan-form {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}

.new-plan-form label {
    font-size: 17px;
    font-weight: 600;
}

.new-plan-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
    color: var(--solved-grey);
    font: inherit;
    font-size: 20px;
}

.new-plan-form .primary-button,
.new-plan-form .secondary-button {
    align-self: center;
}

.secondary-button {
    border: none;
    background: none;
    color: var(--solved-grey);
    font-size: 17px;
    padding: 10px 20px;
}


/* Smaller screens / portrait iPad */

@media (max-width: 600px) {
    .app-container {
        width: 100%;
        padding: 35px 20px;
    }

    .app-header h1 {
        font-size: 32px;
    }

    .primary-button {
    font-size: 16px;
    padding: 8px 6px;
    min-width: 0;
    width: 30%;
    text-align: center;
    box-sizing: border-box;
}

    .support-button {
    margin-left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    #binder-list > div {
        padding-right: 20px;
    }

    .binder-actions {
        position: static;
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    #binder-list button::after {
        right: 18px;
    }
}

/* Manage plan dialog */

.manage-dialog {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.manage-dialog.hidden {
    display: none;
}

.manage-dialog-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: min(400px, 80vw);
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.manage-dialog-box h2 {
    margin-top: 0;
}

.manage-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.manage-dialog-actions button {
    padding: 10px 18px;
    cursor: pointer;
}

.app-version {
    font-size: 12px;
    color: #777;
    margin-top: 20px;
    text-align: center;
}

.support-button {
    text-decoration: none;
    margin-left: 12px;
}

/* Demo home screen buttons */
.home-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 80px;
}

.home-actions .primary-button {
    text-decoration: none;
    text-align: center;
}

/* Centre the demo introduction text */
#reminder {
    text-align: center;
}
