.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.modal-overlay.active {
    display: block;
}

.tips-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--modal-bg, #ffffff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 25px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tips-modal.active {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease forwards;
}

.tip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tip-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--title-color, #333);
    line-height: 1.3;
}

.tip-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    color: #666;
    transition: color 0.2s;
}

.tip-close:hover {
    color: #333;
}

.tip-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tip-main {
    text-align: center;
}

.tip-message {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color, #666);
    margin-bottom: 20px;
}

.tip-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 15px 0;
}

.prev-tip,
.next-tip {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.prev-tip:hover,
.next-tip:hover {
    background: #f5f5f5;
}

.prev-tip:disabled,
.next-tip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tip-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.tip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-color, #ddd);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tip-dot.active {
    background: var(--dot-active-color, #4a90e2);
    transform: scale(1.2);
}

.tip-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.disable-tip-btn,
.disable-group-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background: #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9em;
}

.disable-tip-btn:hover,
.disable-group-btn:hover {
    background: #e0e0e0;
}

.tips-overlay {
    display: none;
}

.tips-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--modal-bg, white);
    color: var(--text-color, #333);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
}

.tips-banner.active {
    display: block;
    transform: translateY(0);
    animation: slideDown 0.3s ease-out;
}

.tip-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.tip-nav-button {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--button-color, #4a90e2);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tip-nav-button:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.tip-counter {
    font-size: 12px;
    color: var(--counter-color, #666);
}

.tip-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dot-color, #ddd);
    transition: background-color 0.2s ease;
}

.tip-dot.active {
    background: var(--dot-active-color, #4a90e2);
}

/* Theme support */
/* body.day-theme {
    --modal-bg: #ffffff;
    --text-color: #333333;
    --title-color: #222222;
    --counter-color: #666666;
    --button-color: #4a90e2;
    --button-hover-color: #357abd;
    --dot-color: #dddddd;
    --dot-active-color: #4a90e2;
    --close-button-color: #666666;
    --close-button-hover-color: #333333;
}

body.night-theme {
    --modal-bg: #2d2d2d;
    --text-color: #ffffff;
    --title-color: #ffffff;
    --counter-color: #aaaaaa;
    --button-color: #2ecc71;
    --button-hover-color: #27ae60;
    --dot-color: #555555;
    --dot-active-color: #2ecc71;
    --close-button-color: #aaaaaa;
    --close-button-hover-color: #ffffff;
} */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .tips-modal {
        width: 100%;
        padding: 15px;
        border-radius: 12px;
        margin: 10px;
    }
    
    .tip-title {
        font-size: 18px;
    }
    
    .tip-message {
        font-size: 14px;
    }
    
    .tip-navigation {
        padding: 10px 0;
    }
    
    .tip-dot {
        width: 6px;
        height: 6px;
    }
    
    .tips-modal .tip-actions {
        flex-direction: column;
    }
    
    .tips-modal .disable-tip-btn,
    .tips-modal .disable-group-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .tips-modal {
        width: 95%;
        padding: 20px;
    }
    
    .tip-title {
        font-size: 20px;
    }
    
    .tip-message {
        font-size: 15px;
    }
    
    .tip-actions {
        flex-direction: column;
    }
    
    .tip-nav-button {
        padding: 10px;
    }
    
    .tip-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .tip-main {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .tip-controls {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .tips-modal {
        padding: 15px;
    }

    .tip-content {
        flex-direction: column;
    }

    .tip-actions {
        flex-direction: column;
    }

    .disable-tip-btn,
    .disable-group-btn {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .tips-modal {
        background: var(--modal-bg, #333);
        color: #fff;
    }

    .tip-close {
        color: #999;
    }

    .tip-close:hover {
        color: #fff;
    }

    .prev-tip,
    .next-tip {
        border-color: #666;
        color: #fff;
    }

    .prev-tip:hover,
    .next-tip:hover {
        background: #444;
    }

    .tip-dot {
        background: #666;
    }

    .tip-dot.active {
        background: #fff;
    }

    .disable-tip-btn,
    .disable-group-btn {
        background: #444;
        color: #fff;
    }

    .disable-tip-btn:hover,
    .disable-group-btn:hover {
        background: #555;
    }
}

/* Admin Styles */
.tips-meta-box {
    padding: 10px;
}

.tip-item {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.tip-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.tip-item textarea {
    min-height: 100px;
}

.remove-tip {
    color: #dc3232;
    margin-top: 10px;
}

.mychord-tips-admin {
    padding: 20px;
}

.mychord-tips-admin .tips-table {
    margin-top: 20px;
}

.mychord-tips-admin .tips-table .column-cb {
    width: 30px;
}

.mychord-tips-admin .tips-table .column-title {
    width: 20%;
}

.mychord-tips-admin .tips-table .column-content {
    width: 35%;
}

.mychord-tips-admin .tips-table .column-context {
    width: 15%;
}

.mychord-tips-admin .tips-table .column-status {
    width: 15%;
}

.mychord-tips-admin .tips-table .column-actions {
    width: 15%;
}

.mychord-tips-admin .tips-table input[type="text"],
.mychord-tips-admin .tips-table textarea {
    width: 100%;
}

.mychord-tips-admin .tips-table textarea {
    min-height: 80px;
    resize: vertical;
}

.mychord-tips-admin .button-link-delete {
    color: #dc3232;
}

.mychord-tips-admin .button-link-delete:hover {
    color: #a00;
}

.mychord-tips-admin .tablenav {
    margin: 15px 0;
}

.mychord-tips-admin .tablenav .actions {
    padding: 0;
}

.mychord-tips-admin .check-column {
    padding: 11px 0 0 3px !important;
}

.mychord-tips-admin .notice {
    margin: 15px 0;
}

/* Адаптивний дизайн для малих екранів */
@media screen and (max-width: 782px) {
    .mychord-tips-admin .tips-table .column-content,
    .mychord-tips-admin .tips-table .column-context,
    .mychord-tips-admin .tips-table .column-status {
        display: block;
        width: 100%;
        clear: both;
    }
    
    .mychord-tips-admin .tips-table thead .column-content,
    .mychord-tips-admin .tips-table thead .column-context,
    .mychord-tips-admin .tips-table thead .column-status {
        display: none;
    }
    
    .mychord-tips-admin .tips-table td:not(.check-column) {
        padding: 15px;
    }
    
    .mychord-tips-admin .tips-table textarea {
        min-height: 60px;
    }
}

/* Стилі для повідомлень */
.mychord-tips-admin .notice {
    background: #fff;
    border-left: 4px solid #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 15px 0;
    padding: 1px 12px;
}

.mychord-tips-admin .notice-success {
    border-left-color: #46b450;
}

.mychord-tips-admin .notice-error {
    border-left-color: #dc3232;
}

/* Анімації */
.mychord-tips-admin .tips-table tr {
    transition: background-color 0.2s ease;
}

.mychord-tips-admin .tips-table tr:hover {
    background-color: #f7f7f7;
}

.mychord-tips-admin .button {
    transition: all 0.2s ease;
}

/* Стилі для кнопок */
.mychord-tips-admin .add-tip-button {
    margin: 15px 0;
}

.mychord-tips-admin .button-primary {
    background: #0073aa;
    border-color: #006799;
    color: #fff;
}

.mychord-tips-admin .button-primary:hover {
    background: #006799;
    border-color: #00557f;
}

/* Адаптивний дизайн для адмін-панелі */
@media (max-width: 782px) {
    .mychord-tips-admin .column-content,
    .mychord-tips-admin .column-context,
    .mychord-tips-admin .column-status {
        display: block;
        width: 100%;
        clear: both;
    }
    
    .mychord-tips-admin thead .column-content,
    .mychord-tips-admin thead .column-context,
    .mychord-tips-admin thead .column-status {
        display: none;
    }
    
    .mychord-tips-admin td:not(.check-column) {
        padding: 15px;
    }
    
    .mychord-tips-admin textarea {
        min-height: 60px;
    }
}
