/* ==================================================
   TIMESNEWSPLUS SETTINGS
================================================== */

.tnp-settings-page {
    width: 100%;
}


/* ==================================================
   SUCCESS MESSAGE
================================================== */

.tnp-settings-success {

    background: #ecfdf3;

    color: #087443;

    border: 1px solid #b7ebcd;

    border-radius: 12px;

    padding: 14px 18px;

    margin-bottom: 24px;

    font-size: 14px;

    font-weight: 600;
}


/* ==================================================
   SETTINGS CARD
================================================== */

.tnp-settings-card {

    background: #ffffff;

    border: 1px solid #e8ebf0;

    border-radius: 18px;

    padding: 26px;

    margin-bottom: 24px;

    box-shadow: 0 8px 25px rgba(0,0,0,.05);
}


/* ==================================================
   CARD HEADER
================================================== */

.tnp-settings-card-header {

    display: flex;

    align-items: center;

    gap: 14px;

    margin-bottom: 24px;
}

.tnp-settings-icon {

    width: 46px;

    height: 46px;

    border-radius: 14px;

    background: #f1f6ff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 21px;

    flex-shrink: 0;
}

.tnp-settings-card-header h3 {

    margin: 0 0 5px;

    font-size: 19px;

    color: #172033;
}

.tnp-settings-card-header p {

    margin: 0;

    color: #7b8494;

    font-size: 13px;
}


/* ==================================================
   ACCOUNT
================================================== */

.tnp-settings-account-row {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid #eef0f3;
}

.tnp-settings-account-row span {

    color: #7a8494;

    font-size: 13px;
}

.tnp-settings-account-row strong {

    color: #222b3a;

    font-size: 14px;

    text-align: right;

    word-break: break-word;
}

.tnp-settings-account-action {

    padding-top: 20px;
}


/* ==================================================
   SETTINGS OPTIONS
================================================== */

.tnp-settings-options {

    display: flex;

    flex-direction: column;
}

.tnp-setting-option {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;

    border-bottom: 1px solid #eef0f3;

    cursor: pointer;
}

.tnp-setting-option:last-child {

    border-bottom: none;
}

.tnp-setting-text {

    display: flex;

    flex-direction: column;

    gap: 5px;
}

.tnp-setting-text strong {

    color: #222b3a;

    font-size: 14px;
}

.tnp-setting-text span {

    color: #7b8494;

    font-size: 12px;

    line-height: 1.5;
}


/* ==================================================
   TOGGLE
================================================== */

.tnp-setting-option input[type="checkbox"] {

    appearance: none;

    width: 46px;

    height: 25px;

    background: #d9dee7;

    border-radius: 999px;

    position: relative;

    cursor: pointer;

    flex-shrink: 0;

    transition: .25s;
}

.tnp-setting-option input[type="checkbox"]::before {

    content: "";

    position: absolute;

    width: 19px;

    height: 19px;

    background: #ffffff;

    border-radius: 50%;

    left: 3px;

    top: 3px;

    transition: .25s;

    box-shadow: 0 2px 5px rgba(0,0,0,.15);
}

.tnp-setting-option input[type="checkbox"]:checked {

    background: #005baa;
}

.tnp-setting-option input[type="checkbox"]:checked::before {

    transform: translateX(21px);
}


/* ==================================================
   READING INFORMATION
================================================== */

.tnp-settings-info {

    display: flex;

    flex-direction: column;
}

.tnp-settings-info-item {

    display: flex;

    gap: 14px;

    padding: 17px 0;

    border-bottom: 1px solid #eef0f3;
}

.tnp-settings-info-item:last-child {

    border-bottom: none;
}

.tnp-settings-info-icon {

    width: 38px;

    height: 38px;

    border-radius: 10px;

    background: #f7f8fa;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}

.tnp-settings-info-item strong {

    display: block;

    color: #222b3a;

    font-size: 14px;

    margin-bottom: 4px;
}

.tnp-settings-info-item p {

    margin: 0;

    color: #7b8494;

    font-size: 12px;

    line-height: 1.55;
}


/* ==================================================
   BUTTONS
================================================== */

.tnp-settings-secondary-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 11px 17px;

    border-radius: 10px;

    background: #f1f5f9;

    color: #263445;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition: .2s;
}

.tnp-settings-secondary-btn:hover {

    background: #e6edf5;

    color: #005baa;
}


/* ==================================================
   SAVE
================================================== */

.tnp-settings-save {

    display: flex;

    justify-content: flex-end;

    margin-bottom: 24px;
}


/* ==================================================
   SECURITY
================================================== */

.tnp-security-actions {

    display: flex;

    gap: 12px;

    flex-wrap: wrap;
}

.tnp-settings-logout-btn {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    padding: 11px 17px;

    border-radius: 10px;

    background: #fff1f1;

    color: #d60000;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;

    transition: .2s;
}

.tnp-settings-logout-btn:hover {

    background: #d60000;

    color: #ffffff;
}


/* ==================================================
   BACK
================================================== */

.tnp-settings-back {

    text-align: center;

    padding: 5px 0 25px;
}

.tnp-settings-back a {

    color: #005baa;

    text-decoration: none;

    font-size: 13px;

    font-weight: 600;
}

.tnp-settings-back a:hover {

    color: #d60000;
}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {

    .tnp-settings-card {

        padding: 20px;

        border-radius: 15px;
    }

    .tnp-settings-card-header {

        align-items: flex-start;
    }

    .tnp-settings-account-row {

        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }

    .tnp-settings-account-row strong {

        text-align: left;
    }

    .tnp-setting-option {

        align-items: flex-start;
    }

    .tnp-setting-text {

        max-width: calc(100% - 60px);
    }

    .tnp-settings-save {

        justify-content: stretch;
    }

    .tnp-settings-save .tnp-btn {

        width: 100%;

        text-align: center;
    }

}


/* ==================================================
   SMALL PHONES
================================================== */

@media (max-width: 480px) {

    .tnp-settings-card {

        padding: 17px;
    }

    .tnp-settings-card-header h3 {

        font-size: 17px;
    }

    .tnp-security-actions {

        flex-direction: column;
    }

    .tnp-settings-secondary-btn,
    .tnp-settings-logout-btn {

        width: 100%;

        box-sizing: border-box;
    }

}

/* =====================================================
   TIMESNEWSPLUS SETTINGS
   SECURITY / CHANGE PASSWORD
===================================================== */

.tnp-settings-success,
.tnp-settings-error {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.tnp-settings-success {
    background: #ecfdf3;
    border: 1px solid #b7ebc6;
    color: #166534;
}

.tnp-settings-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #b91c1c;
}


/* =====================================================
   SECURITY CARD
===================================================== */

.tnp-security-card {
    margin-top: 24px;
}

.tnp-security-card .tnp-settings-card-header {
    margin-bottom: 22px;
}


/* =====================================================
   PASSWORD FORM
===================================================== */

.tnp-password-form {
    width: 100%;
    max-width: 100%;
}


/* =====================================================
   PASSWORD FIELD
===================================================== */

.tnp-password-field {
    margin-bottom: 20px;
}

.tnp-password-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.tnp-password-field small {
    display: block;
    margin-top: 7px;
    font-size: 11px;
    color: #777;
}


/* =====================================================
   PASSWORD INPUT WRAPPER
===================================================== */

.tnp-password-input {
    position: relative;
    width: 100%;
}


/* =====================================================
   PASSWORD INPUT
===================================================== */

.tnp-password-input input {
    width: 100%;
    height: 46px;
    box-sizing: border-box;

    padding: 0 48px 0 14px;

    border: 1px solid #dfe3e8;
    border-radius: 9px;

    background: #fff;

    color: #222;

    font-size: 14px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.tnp-password-input input:focus {
    border-color: #005baa;

    box-shadow:
        0 0 0 3px rgba(0, 91, 170, .10);
}


/* =====================================================
   PASSWORD SHOW / HIDE BUTTON
===================================================== */

.tnp-password-toggle {
    position: absolute;

    right: 8px;
    top: 50%;

    transform: translateY(-50%);

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 7px;

    background: #f3f5f7;

    color: #555;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    font-size: 15px;

    padding: 0;
}

.tnp-password-toggle:hover {
    background: #e8edf2;
}


/* =====================================================
   SECURITY ACTIONS
===================================================== */

.tnp-security-actions {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 24px;
}


/* =====================================================
   CHANGE PASSWORD BUTTON
===================================================== */

.tnp-security-actions
.tnp-settings-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    border: none;
    border-radius: 9px;

    background: #005baa;
    color: #fff;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.tnp-security-actions
.tnp-settings-secondary-btn:hover {
    background: #004985;
    color: #fff;
    transform: translateY(-1px);
}


/* =====================================================
   LOGOUT BUTTON
===================================================== */

.tnp-security-actions
.tnp-settings-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    border-radius: 9px;

    background: #fff1f1;
    color: #d60000;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition:
        background .2s ease,
        color .2s ease;
}

.tnp-security-actions
.tnp-settings-logout-btn:hover {
    background: #d60000;
    color: #fff;
}


/* =====================================================
   SETTINGS BACK LINK
===================================================== */

.tnp-settings-back {
    text-align: center;
    margin-top: 24px;
    margin-bottom: 30px;
}

.tnp-settings-back a {
    color: #005baa;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.tnp-settings-back a:hover {
    text-decoration: underline;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    .tnp-security-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tnp-security-actions
    .tnp-settings-secondary-btn,
    .tnp-security-actions
    .tnp-settings-logout-btn {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .tnp-password-input input {
        height: 44px;
        font-size: 13px;
    }

    .tnp-password-field label {
        font-size: 12px;
    }

}