:root {
    --main-color: #0A3161;
    --color-default: #6396a1;
    --color-red: #ed3838;
    --color-light-red: #ffebeb;
    --color-yellow: #d9cb00;
    --color-light-yellow: #fffaca;
    --color-cyan: #27c4b5;
    --color-green: #27eb00;
    --color-light-green: #e1ffdb;
    --color-blue: #00d7d9;
    --color-light-blue: #d7feff;
    --color-white: #ffffff;
    --color-grey: #f1f5f7;
    --color-black: #0f172a;
    --color-disabled: #89CFF0;
}

.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: 34px;
}

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

.heading_content h1 {
    font-size: 42px;
    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: 999px;
    transition: all 0.3s ease;
}

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

.ielts-tabs a.active {
    pointer-events: none;
    cursor: default;
}

.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;
    border-radius: 999px;
    overflow: hidden;
    width: 60%;
    max-width: 546px;
}

.ielts-search input {
    width: 100%;
    padding: 12px 47px 12px 15px;
    border: none;
    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 15px;
    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: 999px;
    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: 20px;
    padding: 48px 160px;
    background-color: #fedbd9;
}

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

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

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

/* Test item - New Card Design */
.ielts-test-card {
    background: var(--color-white);
    border-radius: 24px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    width: calc(33.33% - 12px);
    box-sizing: border-box;
}

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

.ielts-test-card .card-header {
    background: linear-gradient(135deg, var(--header-start), var(--header-end));
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 300ms ease-in-out;
    margin: 10px;
    border-top-right-radius: 16px;
    border-top-left-radius: 16px;
}

.ielts-test-card:hover .card-header {
    background: linear-gradient(135deg, var(--header-start), var(--header-end));
    filter: brightness(1.05);
}

.card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-tag {
    background: var(--tag-color);
    color: var(--tag-text-color);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 150ms ease-in-out;
}

.card-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.card-time-badge {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

.time-icon {
    font-size: 10px;
    opacity: 0.8;
}

.card-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    color: var(--color-white);
    font-size: 20px;
    font-weight: 700;
    text-align: left;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.card-content {
    padding: 20px;
    position: relative;
}

.content-main {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: center;
}

.score-section {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.score-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.score-circle::after {
    content: '';
    position: absolute;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--color-white);
    z-index: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    z-index: 1;
    margin: 0;
    line-height: 1;
}

.score-unit {
    font-size: 11px;
    color: #6b7280;
    z-index: 1;
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-score-btn {
    background: none;
    color: #4b5563;
    border: none;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 300ms ease-in-out;
    position: absolute;
    top: 20px;
    right: 20px;
}

.view-score-btn:hover {
    color: #1f2937;
}

.countdown-timer {
    background: none;
    color: #ef4444;
    border: none;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    top: 16px;
    right: 20px;
}

.status-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.status-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.status-heading {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.status-description {
    font-size: 12px;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 100%;
}

.action-button {
    background: linear-gradient(135deg, var(--action-start), var(--action-end));
    color: var(--color-white);
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    color: var(--color-white);
}

.action-button:hover::before {
    left: 100%;
}

.action-button:active {
    transform: translateY(-1px) scale(0.98);
}

.action-icon {
    font-size: 14px;
    transition: transform 0.15s ease;
}

.action-button:hover .action-icon {
    transform: scale(1.1);
}

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

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

.ielts-pagination a.active {
    background: linear-gradient(135deg, #ff6a00 0%, #ee0979 100%);
    color: var(--color-white);
    pointer-events: none;
    cursor: default;
}

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

@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: 24px;
    }

    .heading_animate {
        overflow: hidden;
        margin-bottom: 24px;
    }

    .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-filters select {
        font-size: 14px;
        min-width: 120px;
    }

    .ielts-test-card {
        min-height: auto;
    }

    .card-title {
        font-size: 16px;
    }

    .content-main {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        margin-top: 20px;
    }

    .view-score-btn {
        top: 10px;
    }

    .status-section {
        align-items: center;
    }

    .score-circle {
        width: 90px;
        height: 90px;
    }

    .score-circle::after {
        width: 76px;
        height: 76px;
    }

    .score-value {
        font-size: 24px;
    }

    .action-button {
        padding: 10px 16px;
        font-size: 12px;
    }

    .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;
    }
}

/* 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-card {
        width: 100%;
    }

    .score-circle {
        width: 100px;
        height: 100px;
    }

    .score-circle::after {
        width: 86px;
        height: 86px;
    }
}

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