:root {
    --main-color: #004646;
    --color-default: #6396a1;
    --color-red: #ed3838;
    --color-light-red: #ffebeb;
    --color-yellow: #cfad1d;
    --color-light-yellow: #fff0c3;
    --color-cyan: #27c4b5;
    --color-blue: #457aff;
    --color-light-blue: #dbf0ff;
    --color-white: #ffffff;
    --color-grey: #f1f5f7;
    --color-black: #0f172a;
    --color-disabled: #b8d3d9;
}

.ieltstest-actions {
    margin-top: 20px;
    text-align: right;
}

.ieltstest-actions .btn {
    margin-left: 5px;
}

.path-local-ieltstest .generaltable td {
    vertical-align: middle;
}

.path-local-ieltstest .btn {
    margin: 2px;
}

.path-local-ieltstest .alert {
    padding: 15px;
    border-radius: 4px;
}

.path-local-ieltstest .alert-info {
    color: var(--main-color);
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.path-local-ieltstest .test-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
}

.path-local-ieltstest .test-card-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.path-local-ieltstest .test-card-content {
    margin-bottom: 15px;
}

.path-local-ieltstest .test-card-footer {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    text-align: right;
}

/* General styles */
.path-local-ieltstest,
.path-local-ieltstest #page,
.path-local-ieltstest #page.drawers .main-inner,
.path-local-ieltstest #region-main {
    background-color: var(--color-white);
}

.path-local-ieltstest #page.drawers .main-inner,
.path-local-ieltstest #page.drawers div[role="main"] {
    padding-left: 0;
    padding-right: 0;
}

.path-local-ieltstest #page-header {
    display: none;
}

.path-local-ieltstest #page-footer {
    visibility: hidden;
}

.path-local-ieltstest a:not([class]):focus {
    box-shadow: none;
}

/* Custom header */
.ielts-test-header {
    padding: 0 160px;
}

.heading_animate {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.heading_content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.heading_content h1 {
    font-size: 48px;
    line-height: 1.1;
    color: var(--main-color);
}

.textSkewUp {
    perspective: 400px;
}

.word {
    display: inline-flex;
}

.char {
    display: inline-block;
    opacity: 0;
}

.heading_animate svg {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
}

.heading_animate svg path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    opacity: 0;
}

.heading_icon img {
    position: relative;
    z-index: 1;
    max-width: 50px;
    height: auto;
}

/* Navigation tabs */
.ielts-tabs {
    display: flex;
    margin-bottom: 24px;
    gap: 8px;
    flex-wrap: wrap;
}

.ielts-tabs a {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    background-color: var(--color-grey);
    color: var(--main-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ielts-tabs a:hover,
.ielts-tabs a.active {
    background-color: var(--main-color);
    color: var(--color-white);
}

.mobile-ielts-divider {
    display: none;
}

/* Search and filter */
.ielts-search-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    align-items: center;
}

.ielts-search {
    position: relative;
    width: 60%;
    max-width: 546px;
}

.ielts-search input {
    width: 100%;
    padding: 12px 44px 12px 12px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 300 !important;
    color: var(--color-black);
    background-color: var(--color-grey);
    outline: none;
}

.ielts-search input::placeholder {
    color: var(--color-black);
}

.ielts-search .search-button {
    max-height: 48px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
}

.ielts-search-loading {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--color-red);
    font-style: italic;
}

.ielts-search.loading .search-button {
    display: none;
}

.ielts-search .search-button img {
    max-width: 24px;
    opacity: 0.2;
}

.ielts-search .search-button:hover img,
.ielts-search input:focus + .search-button img {
    opacity: 1;
}

.ielts-search.loading .ielts-search-loading {
    display: block !important;
}

.ielts-filters {
    display: flex;
    gap: 8px;
}

.ielts-filters select {
    min-width: 160px;
    padding: 12px 15px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background-color: var(--color-grey);
    color: var(--main-color);
    appearance: none;
    background-image: url('pix/dropdown-icon.png');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 30px;
    cursor: pointer;
    outline: none;
}

/* Section titles */
.ielts-section-title {
    position: relative;
    color: var(--color-red);
    font-size: 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
}

/* Divider */
.ielts-divider {
    border: none;
    border-top: 1px solid var(--color-default);
    margin: 48px 0;
}

/* Test container */
.ielts-test-content {
    position: relative;
    margin-top: 48px;
    padding: 24px 160px;
    background-color: var(--color-grey);
}

.ielts-test-content:before {
    content: "";
    position: absolute;
    top: -35px;
    left: 0;
    right: 0;
    width: 100%;
    height: 82px;
    background-image: url('pix/vector-thunder.png');
    background-repeat: no-repeat;
}

.inprogress-test-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.ielts-test-grid {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.ielts-test-row {
    display: flex;
    gap: 24px;
    width: 100%;
}

/* Test item */
.ielts-test-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--color-white);
    border-radius: 24px;
    min-height: 212px;
    padding: 24px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    width: calc(50% - 12px);
    box-sizing: border-box;
}

.inprogress-test-container .ielts-test-item {
    border: 1px solid var(--color-red);
}

.ielts-test-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.ielts-test-heading .heading-names {
    display: flex;
    flex-direction: column;
}

.ielts-test-state {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    line-height: 1;
}

.ielts-test-state .state-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.ielts-test-item.inprogress .state-icon {
    background-color: var(--color-red);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--color-light-red);
}

.ielts-test-item.not_attempted .state-icon {
    background-color: var(--color-default);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--color-grey);
}

.ielts-test-item.abandoned .state-icon {
    background-color: var(--color-yellow);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--color-light-yellow);
}

.ielts-test-item.finished .state-icon {
    background-color: var(--color-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px var(--color-light-blue);
}

.ielts-test-state .state-text {
    font-size: 12px;
}

.ielts-test-item.inprogress .state-text {
    color: var(--color-red);
}

.ielts-test-item.not_attempted .state-text {
    color: var(--color-default);
}

.ielts-test-item.abandoned .state-text {
    color: var(--color-yellow);
}

.ielts-test-item.finished .state-text {
    color: var(--color-blue);
}

.ielts-test-tag {
    display: inline-block;
    display: flex;
    align-items: center;
    line-height: 1;
    padding: 6px 7.5px;
    border-radius: 4px;
}

.ielts-test-tag.listening {
    background-color: var(--color-light-blue);
    color: var(--color-blue);
}

.ielts-test-tag.writing {
    background-color: var(--color-light-red);
    color: var(--color-red);
}

.ielts-test-tag.reading {
    background-color: var(--color-grey);
    color: var(--color-cyan);
}

.ielts-test-tag.speaking {
    background-color: var(--color-light-yellow);
    color: var(--color-yellow);
}

.ielts-test-tag.other {
    background-color: #eaeaea;
    color: #666;
}

.ielts-test-tag span {
    font-size: 12px;
    font-weight: 500 !important;
}

.ielts-test-title-wp {
    display: flex;
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    flex-wrap: wrap;
}

.ielts-test-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 24px;
    line-height: 1.25;
    margin: 0;
    color: var(--main-color);
}

/* Flower-shaped score badge */
.ielts-test-score {
    width: 72px;
    height: 68px;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-image: url('pix/score-icon-red.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.ielts-test-score p {
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 0;
}

.ielts-test-score span {
    font-size: 8px;
    letter-spacing: 3px;
    margin: -4px 0 0 2px;
}

.ielts-test-score.empty {
    background-image: url('pix/score-icon-grey.png');
    color: var(--color-disabled);
}

.ielts-test-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.ielts-test-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-disabled);
    font-size: 16px;
    margin-right: 20px;
    flex: 1;
    line-height: 1;
}

.ielts-test-time .time-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
}

.ielts-test-time.inprogress .time-icon {
    color: var(--color-red);
}

.ielts-test-time .time-icon i {
    font-size: 20px;
}

.ielts-test-time.inprogress .time-used {
    color: var(--color-red);
}

.ielts-test-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.ielts-test-actions a {
    text-decoration: none;
}

.ielts-test-button {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
    cursor: pointer;
}

.ielts-test-button.red {
    background-color: var(--color-red);
    color: var(--color-white);
}

.ielts-test-button.red:hover {
    background-color: #e62e28;
}

.ielts-test-button.green {
    background-color: var(--main-color);
    color: var(--color-white);
}

.ielts-test-button.green:hover {
    background-color: #00352d;
}

.ielts-test-button.secondary {
    background-color: var(--color-grey);
    color: var(--color-black);
}

.ielts-test-button.secondary.not_attempted {
    color: var(--color-disabled);
    cursor: not-allowed;
    pointer-events: none;
}

.ielts-test-button.secondary:hover {
    background-color: #e8ebed;
}

/* Pagination */
.ielts-pagination {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    margin-bottom: 48px;
}

.ielts-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    color: var(--main-color);
}

.ielts-pagination a.active {
    background-color: var(--color-red);
    color: var(--color-white);
}

.ielts-pagination a.prev-page.disabled:hover,
.ielts-pagination a.next-page.disabled:hover {
    font-style: normal;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .ielts-search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ielts-search {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .ielts-test-row {
        flex-direction: column;
    }
    
    .ielts-test-item {
        width: 100%;
    }
}

@media (max-width: 1279px) {
    .ielts-test-header {
        padding: 24px 80px 0;
    }

    .ielts-test-content {
        padding: 24px 80px;
    }
}

@media (max-width: 1023px) {
    .ielts-test-header {
        padding: 24px 24px 0;
    }

    .ielts-test-content {
        padding: 24px;
    }

    .heading_content {
        gap: 2px;
        padding: 0;
    }

    .heading_content h1 {
        font-size: 30px;
    }

    .heading_animate {
        overflow: hidden;
        min-height: 50px;
        margin-bottom: 30px;
    }

    .heading_animate svg {
        width: 408px;
        height: 50px;
    }

    .heading_icon img {
        max-width: 36px;
    }

    .ielts-tabs {
        margin-bottom: 0;
    }

    .ielts-tabs a {
        min-width: 74px;
        padding: 10px 16px;
        font-size: 14px;
    }

    .mobile-ielts-divider {
        display: block;
        border: none;
        border-top: 1px solid var(--color-default);
        margin: 10px 0;
    }

    .ielts-search {
        max-width: unset;
    }

    .ielts-test-content:before {
        background-position: 83%;
    }

    .ielts-filters select {
        font-size: 14px;
        min-width: 120px;
    }

    .ielts-test-item {
        min-height: 252px;
    }

    .ielts-test-title {
        font-size: 18px;
    }

    .ielts-test-time,
    .ielts-test-button {
        font-size: 14px;
    }

    .ielts-test-actions {
        width: 100%;
    }

    .ielts-test-button {
        width: 50%;
        padding: 13.5px 20px;
    }

    .ielts-test-info {
        gap: 16px;
    }

    .ielts-divider {
        margin: 24px 0;
    }

    .ielts-test-grid,
    .ielts-test-row,
    .inprogress-test-container {
        gap: 16px;
    }

    .ielts-pagination {
        margin-top: 24px;
        margin-bottom: 0;
    }

    .ielts-pagination a {
        font-size: 12px;
        width: 48px;
        height: 48px;
    }

    .ielts-pagination a img {
        width: 18px;
    }
}

@media (max-width: 767px) {
    .ielts-filters select {
        min-width: unset;
        width: 50%;
        padding: 9.5px 15px;
    }
}
