/*
 * The styles of the TrigrExam plugin. WordPress loads the file on every page of the site and, in the admin,
 * on the pages of the plugin. The styles of the shortcodes go at the end of the file.
 */

/* Dashboard: the pages of the plugin as cards, as many beside each other as the screen has room for,
   in sections with the part of the site as their heading. */

.trigrexam-section {
    margin: 26px 0 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #dcdcde;
    color: #50575e;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.trigrexam-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.trigrexam-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    padding: 12px 14px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .06);
    color: #1d2327;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.trigrexam-card:hover,
.trigrexam-card:focus {
    border-color: #2271b1;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .12);
    color: #2271b1;
    transform: translateY(-2px);
}

.trigrexam-card-icon.dashicons {
    width: 26px;
    height: 26px;
    margin-bottom: 6px;
    color: #2271b1;
    font-size: 26px;
}

.trigrexam-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

/* Where the page is used, under its title. It keeps its colour when the card is hovered. */
.trigrexam-card-subtitle {
    margin-top: 3px;
    color: #646970;
    font-size: 12px;
    line-height: 1.3;
}

/* Settings: the price of the plugin, as a card with the price in a tag on its right. */

.trigrexam-price {
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    margin: 18px 0 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .08);
}

.trigrexam-price-info {
    flex: 1 1 260px;
    padding: 22px 26px;
}

.trigrexam-price-label {
    display: inline-block;
    padding: 4px 10px;
    background: #e7f1fb;
    border-radius: 999px;
    color: #135e96;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.trigrexam-price-name {
    margin-top: 10px;
    color: #1d2327;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.trigrexam-price-tag {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    align-self: stretch;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 22px 28px;
    white-space: nowrap;
    background: linear-gradient(135deg, #2271b1 0%, #1b4f9c 100%);
    color: #fff;
}

.trigrexam-price-currency {
    align-self: flex-start;
    margin: 6px 4px 0 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.trigrexam-price-amount {
    font-size: 54px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}

/* Beside the amount, on its line. */
.trigrexam-price-period {
    margin-left: 8px;
    font-size: 15px;
    font-weight: 600;
    opacity: .9;
}

/* On a narrow screen the tag goes under the name, over the whole width. */
@media (max-width: 600px) {
    .trigrexam-price-tag {
        flex: 1 1 100%;
    }
}

/* A list of links, like TrigrExam > Announcements: what can be added on the left, the list on the right. */

.trigrexam-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 16px;
}

.trigrexam-add {
    flex: 0 0 300px;
    max-width: 100%;
}

.trigrexam-list {
    flex: 1 1 400px;
    max-width: 700px;
}

.trigrexam-box {
    background: #fff;
    border: 1px solid #c3c4c7;
    margin-bottom: 16px;
}

.trigrexam-box h2 {
    margin: 0;
    padding: 10px 12px;
    font-size: 14px;
    border-bottom: 1px solid #c3c4c7;
}

.trigrexam-box-inside {
    padding: 12px;
}

.trigrexam-pages {
    max-height: 240px;
    overflow: auto;
    margin: 0 0 12px;
    padding: 8px;
    border: 1px solid #dcdcde;
}

.trigrexam-pages li {
    margin: 0 0 6px;
}

.trigrexam-items {
    margin: 0;
    min-height: 20px;
}

.trigrexam-item {
    margin: 0 0 8px;
    background: #fff;
    border: 1px solid #c3c4c7;
}

.trigrexam-item-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f6f7f7;
    cursor: move;
}

.trigrexam-item-title {
    flex: 1;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trigrexam-item-type {
    color: #646970;
    white-space: nowrap;
}

.trigrexam-item-settings {
    padding: 4px 12px 8px;
    border-top: 1px solid #c3c4c7;
}

.trigrexam-item-page .trigrexam-item-url, .trigrexam-item-custom .trigrexam-item-original {
    display: none;
}

.trigrexam-item-missing {
    display: block;
    color: #b32d2e;
}

.trigrexam-item-placeholder {
    margin: 0 0 8px;
    height: 40px;
    border: 1px dashed #8c8f94;
}

.trigrexam-empty {
    color: #646970;
}

.trigrexam-items:not(:empty) + .trigrexam-empty {
    display: none;
}

/* Enquiries: one that is opened is not bold any more. */

.row-title.trigrexam-enquiry-read {
    font-weight: 400;
}


/* ---------- The site: the styles of the shortcodes ---------- */

/* The "Quick Enquiry" button, fixed at the bottom of the page, and its popup, which is closed until the
   button is clicked. */

.open-button {
    position: fixed;
    bottom: 0;
    left: 20px;
    z-index: 9999;
    padding: 8px 10px;
    background-color: #ed3833;
    border: none;
    border-radius: 10px 10px 0 0;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
}

.open-button:hover {
    background-color: #952c2d;
}

.form-popup {
    display: none;
    position: fixed;
    top: 244px;
    right: 2px;
    bottom: 0;
    z-index: 9;
    box-sizing: border-box;
    width: auto;
    max-width: 350px;
    max-height: 627px;
    padding: 0 25px;
    overflow: hidden;
    overflow-y: auto;
    background-color: #fff;
    border: 3px solid #f1f1f1;
}

.form-popup .close {
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 23px;
    height: 23px;
    background: #f44336;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 22px;
    opacity: 1;
    text-align: center;
}

@media only screen and (max-width: 768px) {
    .open-button {
        margin-top: -220px;
    }

    .form-popup {
        top: 184px;
    }
}

/* The enquiry form, in the popup and in a page. */

.wpcf7-form .enquiry {
    border-bottom: 1px solid;
    border-radius: 6px;
    color: #9a0404;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    box-sizing: border-box;
    width: 100%;
}

.wpcf7-form .wpcf7-textarea {
    height: 40px;
}

.wpcf7-form .wpcf7-not-valid-tip {
    display: block;
    color: #dc3232;
    font-size: 13px;
}

.wpcf7-form .wpcf7-response-output {
    margin: 10px 0;
    padding: 8px 12px;
    border: 2px solid #dc3232;
}

.wpcf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
    border-color: #46b450;
}

/* The scrolling announcements: the "new" mark in front of each one. */

.newb {
    display: inline-block;
    width: 39px;
    height: 17px;
    background: url(https://careerendeavour.com/wp-content/uploads/2016/03/new.gif) no-repeat;
}

/* The components a list of links is shown as: [announcement view="list"], "table", "card" and "toggle". */

.trigrexam-view-list {
    margin: 0 0 16px;
    padding-left: 20px;
}

.trigrexam-view-list li {
    margin: 0 0 10px;
}

.trigrexam-view-tables {
    overflow-x: auto;
}

.trigrexam-view-table {
    width: 100%;
    margin: 0 0 20px;
    border-collapse: collapse;
}

.trigrexam-view-table caption {
    padding: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
}

.trigrexam-view-table th,
.trigrexam-view-table td {
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    text-align: left;
    vertical-align: middle;
}

.trigrexam-view-table th {
    background: #f6f7f7;
    font-weight: 600;
}

.trigrexam-view-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* The number and the button are as narrow as what is in them; the title has the rest. */
.trigrexam-view-table th:first-child,
.trigrexam-view-table td:first-child,
.trigrexam-view-table th:last-child,
.trigrexam-view-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.trigrexam-view-button {
    display: inline-block;
    padding: 5px 14px;
    background: #ed3833;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.trigrexam-view-button:hover,
.trigrexam-view-button:focus {
    background: #952c2d;
    color: #fff;
}

/* As many cards beside each other as the page has room for. */
.trigrexam-view-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin: 0 0 20px;
}

.trigrexam-view-card {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 90px;
    padding: 16px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(16, 24, 40, .06);
    color: #1d2327;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

a.trigrexam-view-card:hover,
a.trigrexam-view-card:focus {
    border-color: #ed3833;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .12);
    color: #ed3833;
    transform: translateY(-2px);
}

.trigrexam-view-toggle {
    margin: 0 0 8px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
}

.trigrexam-view-toggle summary {
    padding: 12px 14px;
    background: #f6f7f7;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.trigrexam-view-toggle[open] summary {
    border-bottom: 1px solid #dcdcde;
    border-radius: 6px 6px 0 0;
}

.trigrexam-view-toggle ul {
    margin: 0;
    padding: 12px 14px 12px 34px;
}

.trigrexam-view-toggle li {
    margin: 0 0 6px;
}

.cardview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
    align-items: stretch;
}

.cardview-grid .trigrexam-view-column {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    float: none;
    box-sizing: border-box;
}

.cardview-grid .widget {
    height: 100%;
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cardview-grid .widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
}

.cardview-grid .subtitle {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    color: #222;
}

.cardview-grid .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cardview-grid .menu-item {
    margin: 0;
    padding: 0;
}

.cardview-grid .menu-item a {
    display: block;
    padding: 9px 0;
    color: #444;
    text-decoration: none;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.cardview-grid .menu-item:last-child a {
    border-bottom: none;
}

.cardview-grid .menu-item a:hover {
    color: #0073aa;
    padding-left: 6px;
}

/* Tablet: 2 columns */
@media (max-width: 991px) {
    .cardview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    .cardview-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cardview-grid .widget {
        padding: 18px;
    }
}
.cardview-grid .subtitle{
    font-size: 16px !important;
    color: #9c211e;
    font-weight: 600;
    border-bottom: 2px solid #9c211e;
    padding: 10px 12px;
    margin: 0;
    background-color: #f2f2f2;
}
