/* Catalog page styles - collection cards and buy phrases */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.repeat-cycles-button {
    margin-top: 1rem;
    font-size: 1.7rem;
    text-align: center;
    cursor: pointer;
    color: #FFFFFF;
    border: 1px solid var(--orange-color);
    border-radius: 40px;
    background: transparent;
    padding: 7px 30px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: transform 0.3s ease;
}

.notification-bell-button {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-bell-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-bell-icon {
    width: 24px;
    height: 24px;
    filter: invert(100%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.notification-bell-button:hover .notification-bell-icon {
    opacity: 1;
}

.repeat-cycles-button:hover {
    transform: translateX(-50%) scale(1.02);
}

#catalog-content {
    opacity: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

#catalog-content.loaded {
    animation: fadeIn 1s ease-in-out forwards;
}

.phrase-collection {
    gap: 1rem;
    margin-left: 20px;
    padding-top: 1rem;
    position: relative;
}

.phrase-collection-phrases {
    position: relative;
    z-index: 1;
}

.phrase-collection-title {
    font-size: 1.2rem;
    font-weight: 250;
    padding-right: 20px;
}

.phrase-collection-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-top: 10px;
    padding-right: 20px;
    gap: 15px;
}

.phrase-collection-list {
    font-size: 0.7rem;
    opacity: 0.8;
    flex: 1;
}

.phrase-collection-settings {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 3px;
}

.phrase-collection-settings img {
    filter: invert(100%);
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.phrase-collection-settings:hover {
    opacity: 1;
}

.phrase-collection-settings:hover img {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .phrase-collection-settings {
        padding: 6px;
    }
    .phrase-collection-settings img {
        width: 16px;
        height: 16px;
    }
}

.collection-video {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 16/10; /* This will make the video taller */
    margin-bottom: 1rem;
    max-width: 100vw;
}

.paid-collections{
    margin-top: 4rem;
}

/* Legacy phrase collections styles */
.phrase-collections {
    height: 100vh;
    overflow: hidden;
}

.phrase-collections-title {
    color: var(--light-brown-color);
    font-size: 1.5rem;
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.phrase-collection-item {
    display: flex;
    margin-top: 0.5rem;
}

.phrase-collection-item-title {
    font-size: 2rem;
    flex: 2;
    text-align: left;
    color: white;
    padding-left: 2rem;
}

.phrase-collection-item-action {
    font-size: 2rem;
    color: var(--orange-color);
    flex: 1;
    text-align: left;
}

.phrase-collection-item-action-repeat-after {
    display: none;
    font-size: 1rem;
    color: var(--orange-color);
    flex: 1;
    text-align: left;
}

.phrase-collection-item-action-repeat-after.show {
    display: block;
}

.repeat-after-text {
    color: var(--light-brown-color);
}

.repeat-after-time {
    color: var(--orange-color);
}

.phrase-collection-item-title.collection-disalbed {
    color: var(--light-brown-color);
}

.phrase-collection-item-action.start-learning.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.it-business{
    margin-left: 20px;
    margin-top: 4rem;
    position: relative;
}

.it-business-table{
    margin-top: 5px;
}

.it-business-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.business-phrase-count {
    font-size: 0.7rem;
    font-weight: 300;
    display: flex;
    gap: 10px;
}

.add-button{
    text-align: right;
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.add-button button {
    background: none;
    border: none;
    color: var(--orange-color);
    font-size: 1.25rem;
    font-weight: 250;
    cursor: pointer;
    display: flex;
    align-items: flex-end;  /* Aligns text to bottom */
    min-height: 100%;      /* Takes full height of container */
    padding: 0 0 2px 0;            /* Remove default padding */
}

.it-business-table-list {
    font-size: 0.7rem;
    font-weight: 300;
    opacity: 0.8;
    margin-top: 10px;
}


.price{
    color: white;
    opacity: 0.6;
    font-weight: 250;
}

.random {
    margin-top: 1rem;
    margin-left: 20px;
    position: relative;
}

.random-table {
    margin-top: 5px;
}

.random-table-list {
    font-size: 0.7rem;
    font-weight: 300;
    opacity: 0.8;
    margin-top: 10px;
}

.random-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.random-phrase-count {
    font-size: 0.7rem;
    font-weight: 300;
    display: flex;
    gap: 10px;
}

.count-option {
    margin-left: 10px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.count-option:first-child {
    margin-left: 0;
}

.count-option.active {
    opacity: 1;
}

.random-table {
    display: flex;
    flex-direction: column;
}

.random-table .add-button {
    margin-right: 20px;
}

.repeat-cycles-title {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.repeat-cycles-title-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.repeat-cycles-title-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-icon-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.repeat-cycles-info-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.repeat-cycles-info-icon:hover {
    opacity: 1;
    transform: scale(1.15);
}

.notification-bell-button {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-bell-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notification-bell-icon {
    width: 18px;
    height: 18px;
    filter: invert(100%);
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.notification-bell-button:hover .notification-bell-icon {
    opacity: 1;
}

.info-popup {
    position: fixed;
    display: none;
    background-color: #F1F1F1;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    z-index: 2000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    color: var(--dark-brown-color);
    word-wrap: break-word;
    white-space: normal;
    box-sizing: border-box;
    max-width: calc(100vw - 40px);
    width: auto;
    min-width: 200px;
}


.info-popup.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.repeat-cycles {
    padding: 0 20px; /* Move padding to parent */
}

.repeat-cycles-table {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding-right: 20px; /* Add padding to show last item fully */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.repeat-cycles-table::-webkit-scrollbar {
    display: none;
}

.repeat-cycles-table-item {
    flex: 0 0 calc(26% - 7.5px); /* Slightly wider to make 5th item peek */
    min-width: calc(26% - 7.5px); /* Prevent items from shrinking */
    background-color: var(--dark-intense-brown);
    border-radius: 5px;
    aspect-ratio: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.repeat-period {
    margin: auto 0; /* Centers vertically */
    text-align: center;
}

.phrases-count-to-repeat {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 0.7rem;
}

/* Phrase Skip Manager Styles */
.phrase-skip-manager {
    display: none;
    padding: 80px 20px 20px 20px;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
}

.phrase-skip-title {
    font-size: 1.4rem;
    margin-bottom: 30px;
    text-align: center;
}

.phrase-skip-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 200px; /* Space for fixed buttons */
}

.phrase-skip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.phrase-skip-item.disabled {
    opacity: 0.4;
}

.phrase-skip-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.phrase-skip-eng {
    font-size: 1rem;
    color: white;
}

.phrase-skip-rus {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.phrase-skip-checkbox {
    width: 24px;
    height: 24px;
    transition: opacity 0.3s ease;
    margin-left: 15px;
    pointer-events: none;
}

.phrase-skip-checkbox svg {
    width: 100%;
    height: 100%;
    fill: white;
}

.phrase-skip-checkbox.disabled {
    opacity: 0.3;
}

.phrase-skip-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 20px 20px 20px;
    background: var(--dark-brown-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.phrase-skip-apply,
.phrase-skip-cancel {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border-radius: 40px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.phrase-skip-apply {
    background-color: var(--orange-color);
    color: white;
}

.phrase-skip-cancel {
    background-color: var(--bg-color);
    color: white;
    border: 1px solid var(--orange-color);
}

.phrase-skip-apply:active {
    transform: scale(0.98);
}

.phrase-skip-cancel:active {
    transform: scale(0.98);
}

/* Make phrase-collection-list clickable */
.phrase-collection-list {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.phrase-collection-list:hover {
    opacity: 1;
}

/* Make repeat-cycles-table-item clickable */
.repeat-cycles-table-item {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.repeat-cycles-table-item:active {
    background-color: var(--light-brown-color);
}

.repeat-cycles-table-item.completed .repeat-period {
    color: var(--orange-color);
}

/* Phrases List Modal Styles */
.phrases-list-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 51, 48, 0);
    backdrop-filter: blur(0px);
    z-index: 2000;
    transition: background-color 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

.phrases-list-modal.show {
    display: block;
    background-color: rgba(58, 51, 48, 0.4);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease-out forwards;
}

.phrases-list-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    margin-top: -40px; /* Offset to account for header height */
    overflow-y: auto;
    padding: 30px;
    opacity: 0;
    background: linear-gradient(to bottom right, rgba(58, 51, 48, 0.7), rgba(58, 51, 48, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.phrases-list-modal.show .phrases-list-modal-content {
    animation: modalSlideIn 0.3s ease-out forwards;
}

/* Add custom scrollbar styling */
.phrases-list-modal-content::-webkit-scrollbar {
    width: 8px;
}

.phrases-list-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.phrases-list-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.phrases-list-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.phrases-list-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}

.phrases-list-modal-title {
    font-size: 1.3rem;
    font-weight: 300;
    color: white;
    letter-spacing: 0.02em;
}

.phrases-list-modal-close {
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    color: white;
    margin: -10px -10px 0 0;
    padding: 10px;
}

.phrases-list-modal-close:hover {
    opacity: 1;
}

.phrases-list-modal-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-right: -10px;
    padding-right: 10px;
}

.phrase-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.phrase-item:last-child {
    border-bottom: none;
}

.phrase-item-eng {
    font-size: 1.1rem;
    color: white;
}

.phrase-item-rus {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Manual Phrase Selection Modal Styles */
.manual-phrase-selection-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 51, 48, 0);
    backdrop-filter: blur(0px);
    z-index: 2000;
    transition: background-color 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

.manual-phrase-selection-modal.show {
    display: block;
    background-color: rgba(58, 51, 48, 0.4);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.3s ease-out forwards;
}

.manual-phrase-selection-content {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    opacity: 1;
    background: linear-gradient(to bottom right, rgba(58, 51, 48, 0.95), rgba(58, 51, 48, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 25px;
    overflow: hidden;
}

.manual-phrase-selection-modal.show .manual-phrase-selection-content {
    animation: modalSlideIn 0.3s ease-out forwards;
}

.manual-phrase-selection-content::-webkit-scrollbar {
    width: 8px;
}

.manual-phrase-selection-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.manual-phrase-selection-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.manual-phrase-selection-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.manual-phrase-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.manual-phrase-selection-title {
    font-size: 1.3rem;
    font-weight: 300;
    color: white;
    letter-spacing: 0.02em;
}

.manual-phrase-selection-close {
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    color: white;
    margin: -10px -10px 0 0;
    padding: 10px;
}

.manual-phrase-selection-close:hover {
    opacity: 1;
}

.manual-phrase-selection-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex: 1 1 auto;
    margin-right: -10px;
    padding-right: 10px;
    margin-bottom: 15px;
    min-height: 0;
    max-height: calc(70vh - 180px);
}

.manual-phrase-selection-body::-webkit-scrollbar {
    width: 8px;
}

.manual-phrase-selection-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.manual-phrase-selection-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.manual-phrase-selection-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.manual-phrase-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.manual-phrase-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.manual-phrase-item.selected {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.manual-phrase-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.manual-phrase-item.selected .manual-phrase-checkbox {
    background-color: var(--orange-color);
    border-color: var(--orange-color);
}

.manual-phrase-checkbox svg {
    width: 12px;
    height: 12px;
    fill: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manual-phrase-item.selected .manual-phrase-checkbox svg {
    opacity: 1;
}

.manual-phrase-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.manual-phrase-eng {
    font-size: 1rem;
    color: white;
    font-weight: 400;
}

.manual-phrase-rus {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.manual-phrase-selection-footer {
    flex: 0 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.manual-phrase-selection-start-btn {
    width: 100%;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 300;
    border: 1px solid var(--orange-color);
    border-radius: 40px;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.manual-phrase-selection-start-btn:hover {
    background-color: var(--orange-color);
}

.manual-phrase-selection-start-btn:active {
    transform: scale(0.98);
}

.manual-phrase-selection-start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.manual-phrase-selection-start-btn:disabled:hover {
    background: transparent;
}

/* Collection Availability Text */
.collection-availability-text {
    position: absolute;
    bottom: 5px;
    left: 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}