/* NestoryAI Design My Account Extensions Styles */

/* General My Account Layout */
.nestoryai-my-designs {
    padding: 20px 0;
}

.my-designs-header h2 {
    margin-bottom: 10px;
    color: var(--text-primary, #2c3e50);
    font-size: 28px;
    font-weight: 600;
}

.my-designs-header .description {
    color: var(--text-secondary, #7f8c8d);
    font-size: 16px;
    margin-bottom: 30px;
}

/* Tab Navigation */
.my-designs-tabs {
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.12);
}

.tabs-list {
    display: flex;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tab-item {
    flex: 1 1 auto;
    min-width: 0;
}

.tab-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-secondary, #7f8c8d);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-item.active .tab-link {
    color: var(--primary-color, #3498db);
    border-bottom-color: var(--primary-color, #3498db);
    background: rgba(52, 152, 219, 0.08);
}

.tab-link:hover {
    color: var(--primary-color, #3498db);
    background: rgba(52, 152, 219, 0.06);
}

.tab-icon {
    font-size: 18px;
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #3498db);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
    line-height: 1;
    font-weight: 600;
}

.tab-item.active .tab-count {
    background: var(--primary-dark, #2980b9);
}

.tab-content-wrapper {
    padding: 20px 0;
}

/* Tab Content Styles */
.designs-tab-content,
.tasks-tab-content,
.favorites-tab-content {
    min-height: 400px;
}

.designs-header,
.tasks-tab-content h3,
.favorites-tab-content h3 {
    margin-bottom: 20px;
}

.designs-header h3,
.tasks-tab-content h3,
.favorites-tab-content h3 {
    color: var(--text-primary, #2c3e50);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.tab-description {
    color: var(--text-secondary, #7f8c8d);
    font-size: 14px;
    margin-bottom: 25px;
}

.designs-count {
    color: var(--text-secondary, #7f8c8d);
    font-size: 14px;
    margin: 0;
}

/* Design Grid and Cards */
.designs-grid,
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.design-card,
.favorite-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.design-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.design-card:hover,
.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.design-thumbnail,
.favorite-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.design-comparison {
    cursor: ew-resize;
}

.design-comparison__inner {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    overflow: hidden;
}

.design-comparison__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    transition: none;
}

.design-comparison__overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    width: 50%;
    z-index: 2;
}

.design-comparison__image--result {
    z-index: 1;
}

.design-comparison__overlay .design-comparison__image {
    left: 0;
    z-index: 2;
}

.design-comparison__handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    pointer-events: none;
    z-index: 3;
}

.design-comparison__handle::before,
.design-comparison__handle::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.design-comparison__handle::before {
    left: 9px;
    border-right: 6px solid rgba(15, 23, 42, 0.55);
}

.design-comparison__handle::after {
    right: 9px;
    border-left: 6px solid rgba(15, 23, 42, 0.55);
}

.design-comparison__handle::after,
.design-comparison__handle::before {
    pointer-events: none;
}

.design-comparison__slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    margin: 0;
    z-index: 4;
}

.design-comparison__slider:focus-visible + .design-comparison__handle {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.35);
}

/* Design detail modal */
.design-modal {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.design-modal__hero {
    position: relative;
    width: 100%;
    padding-top: 56%;
    background: var(--bg-tertiary, #eef2f6);
    border-radius: 12px;
    overflow: hidden;
}

.design-modal__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.design-modal__hero-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.05);
    color: #64748b;
    font-size: 16px;
}

.design-modal__original-card {
    position: absolute;
    bottom: -20px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: zoom-in;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.design-modal__original-card span {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary, #2c3e50);
}

.design-modal__original-card img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.design-modal__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.design-modal__meta-info p {
    margin: 0;
    color: var(--text-secondary, #475569);
    font-size: 14px;
}

.design-modal__status {
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(52, 152, 219, 0.12);
    color: var(--primary-color, #3498db);
    text-transform: capitalize;
}

.design-modal__status--failed {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.design-modal__product {
    display: flex;
    gap: 24px;
    align-items: stretch;
    flex-wrap: wrap;
}

.design-modal__product-image {
    flex: 0 0 260px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-modal__product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.design-modal__product-placeholder {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.design-modal__product-info {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.design-modal__product-info h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary, #1f2937);
}

.design-modal__product-name {
    margin: 0;
    color: var(--text-secondary, #475569);
    line-height: 1.5;
}

.design-modal__product-link {
    color: var(--text-primary, #1f2937);
    font-weight: 600;
    text-decoration: none;
}

.design-modal__product-link:hover {
    color: var(--primary-color, #3498db);
}

.design-modal__product-price {
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin: 0;
}

.design-modal__product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.design-modal__button {
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--primary-color, #3498db);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.design-modal__button:hover {
    background: var(--primary-dark, #1f6da5);
}

.design-modal__button--secondary {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary, #1f2937);
}

.design-modal__button--secondary:hover {
    background: rgba(15, 23, 42, 0.12);
}

.design-modal__button--ghost {
    background: transparent;
    color: var(--primary-color, #3498db);
    border: 1px solid rgba(52, 152, 219, 0.35);
}

.design-modal__button--ghost:hover {
    background: rgba(52, 152, 219, 0.08);
}

.nestoryai-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: min(320px, 80vw);
}

.nestoryai-toast {
    display: none;
    padding: 14px 16px;
    border-radius: 10px;
    background: #1f2937;
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.nestoryai-toast--success {
    background: #166534;
}

.nestoryai-toast--error {
    background: #991b1b;
}

.nestoryai-toast__message {
    flex: 1;
}

.nestoryai-toast__close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.design-modal__product-empty {
    flex: 1;
    padding: 30px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.05);
    color: #64748b;
    font-size: 14px;
}

.design-modal__mask {
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 18px;
    background: #fff;
}

.design-modal__mask h4 {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--text-primary, #1f2937);
}

.design-modal__mask-images {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.design-modal__mask-images img {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.design-modal__mask-caption {
    margin: 12px 0 0;
    font-size: 12px;
    color: #64748b;
}

.design-modal__error {
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
    font-size: 13px;
}

.design-thumbnail img,
.favorite-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.design-card:hover .design-thumbnail img,
.favorite-card:hover .favorite-thumbnail img {
    transform: scale(1.05);
}

.design-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Product snippet on design card */
.design-product-snippet {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    background: #fff;
}

.design-product-snippet__thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.06);
}

.design-product-snippet__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.design-product-snippet__thumb--placeholder {
    color: #94a3b8;
    font-size: 12px;
    padding: 6px;
    text-align: center;
}

.design-product-snippet__body {
    min-width: 0;
}

.design-product-snippet__name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary, #1f2937);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.design-product-snippet__name:hover {
    color: var(--primary-color, #3498db);
}

.design-product-snippet__price {
    margin-top: 4px;
    color: var(--text-secondary, #475569);
    font-size: 13px;
}

.design-product-snippet__cart {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary, #1f2937);
    text-decoration: none;
}

.design-product-snippet__cart .dashicons {
    font-size: 18px;
    line-height: 1;
}

.design-product-snippet__cart:hover {
    background: rgba(52, 152, 219, 0.12);
    color: var(--primary-color, #3498db);
}

.design-card:hover .design-overlay {
    opacity: 1;
}

.favorite-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #e74c3c;
    font-size: 18px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-favorite:hover {
    background: var(--bg-primary, #ffffff);
    transform: scale(1.1);
}

.btn-favorite.is-favorite .heart-icon {
    color: #e74c3c;
}

.heart-icon::before {
    content: "♡";
    font-size: 18px;
    color: var(--text-secondary, #7f8c8d);
    transition: color 0.3s ease;
}

.btn-favorite.is-favorite .heart-icon::before {
    content: "♥";
    color: #e74c3c;
}

.favorite-actions {
    display: flex;
    margin-top: 12px;
}

.favorite-actions .btn-favorite {
    width: auto;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
    gap: 8px;
}

.favorite-actions .btn-favorite:hover {
    background: rgba(231, 76, 60, 0.16);
}

.design-meta,
.favorite-meta {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.design-meta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: auto;
}

.design-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.design-date,
.favorite-date {
    color: var(--text-secondary, #7f8c8d);
    font-size: 12px;
    margin: 0;
}

.design-meta-footer .design-date {
    flex: 1;
    margin: 0;
}

.design-meta-footer .design-actions,
.nestoryai-my-designs .design-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin: 0 0 0 auto;
    text-align: right;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--bg-tertiary, #f2f5f9);
    color: var(--text-primary, #2c3e50);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    position: relative;
}

.icon-button svg {
    pointer-events: none;
}

.icon-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    background: var(--bg-primary, #ffffff);
    color: var(--primary-color, #3498db);
}

.icon-button:focus-visible {
    outline: 2px solid var(--primary-color, #3498db);
    outline-offset: 2px;
}

.icon-button.btn-detail {
    background: var(--bg-tertiary, #eef2f6);
    color: var(--primary-color, #3498db);
}

.icon-button.btn-detail:hover {
    background: var(--primary-light, #dcecff);
}

.icon-button.btn-favorite {
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
}

.icon-button.btn-favorite:hover,
.icon-button.btn-favorite.is-favorite {
    background: rgba(231, 76, 60, 0.16);
    color: #c0392b;
}

.icon-button.btn-delete {
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
}

.icon-button.btn-delete:hover {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.icon-button.is-loading {
    color: var(--primary-color, #3498db);
}

.icon-button.is-loading svg {
    opacity: 0;
}

.icon-button.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: nestoryai-spin 0.8s linear infinite;
}

@keyframes nestoryai-spin {
    to {
        transform: rotate(360deg);
    }
}

.nestoryai-section-heading {
    margin-bottom: 20px;
}

.nestoryai-section-heading h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary, #2c3e50);
}

.nestoryai-section-heading .section-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, #7f8c8d);
}

.active-tasks-section {
    margin-bottom: 36px;
    padding: 24px;
    background: var(--bg-primary, #ffffff);
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
}

.active-task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.active-task-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary, #f4f6fb);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

.active-task-media {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.active-task-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) brightness(0.95);
    transform: scale(1.1);
    transition: transform 0.6s ease;
}

.active-task-card:hover .active-task-media img {
    transform: scale(1.14);
}

.active-task-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    gap: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(2px);
}

.status-pill .status-icon {
    font-size: 16px;
}

.task-id,
.task-meta {
    font-size: 13px;
    margin: 0;
    opacity: 0.85;
}

.task-message {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.active-task-card.status-pending .status-pill,
.active-task-card.status-pending .task-message {
    color: #fcd34d;
}

.active-task-card.status-processing .status-pill,
.active-task-card.status-processing .task-message {
    color: #c0d9ff;
}

/* AI Tasks Styles */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.task-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.task-card.status-pending {
    border-left: 4px solid #f39c12;
}

.task-card.status-processing {
    border-left: 4px solid #3498db;
}

.task-card.status-completed {
    border-left: 4px solid #27ae60;
}

.task-card.status-failed {
    border-left: 4px solid #e74c3c;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 10px;
}

.task-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    font-size: 16px;
}

.status-text {
    font-weight: 600;
    font-size: 14px;
}

.task-date {
    color: #7f8c8d;
    font-size: 12px;
}

.task-content {
    padding: 0 20px 20px;
}

.task-id {
    font-family: monospace;
    font-size: 13px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.progress-container {
    margin-top: 15px;
}

/* Empty States */
.no-designs,
.no-tasks,
.no-favorites {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-designs-icon,
.no-tasks-icon,
.no-favorites-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.no-designs h4,
.no-tasks h4,
.no-favorites h4 {
    color: #2c3e50;
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-designs p,
.no-tasks p,
.no-favorites p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 20px;
}

.no-designs .button {
    background: #28a745;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
    border: none;
    font-weight: 500;
}

.no-designs .button:hover {
    background: #218838;
    color: white;
}

/* Task Result */
.task-result {
    margin-top: 15px;
}

.result-thumbnail {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.result-actions .button {
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.3s ease;
    border: none;
}

.result-actions .button:hover {
    background: #218838;
    color: white;
}

.error-container {
    margin-top: 15px;
}

.error-message {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #fadbd8;
}

/* WooCommerce Account Menu Integration */
.woocommerce-MyAccount-navigation ul li a[href*="my-designs"]::before,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a[href*="my-designs"]::before,
.woocommerce-MyAccount-navigation-link--my-designs a::before {
    content: "\f3fd";
    font-family: "dashicons" !important;
    margin-right: 8px;
    color: #3498db;
    display: inline-block;
    width: 16px;
    height: 16px;
    font-size: 16px;
    vertical-align: middle;
}

/* Fallback for when dashicons don't load */
.woocommerce-MyAccount-navigation ul li a[href*="my-designs"]:not([class*="dashicons"])::before {
    content: "🎨";
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin-right: 8px;
    font-size: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px 0;
}

.page-link {
    padding: 10px 15px;
    border: 2px solid #e8f4f8;
    color: #3498db;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-link:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-link.current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-link.prev,
.page-link.next {
    font-weight: 600;
}

/* Progress Animations */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.processing-note {
    color: #7f8c8d;
    font-style: italic;
    font-size: 13px;
    margin-top: 10px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs-list {
        flex-direction: column;
    }

    .tab-item {
        max-width: none;
        flex: none;
    }

    .designs-grid,
    .favorites-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .design-actions,
    .favorite-actions {
        flex-direction: column;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .designs-grid,
    .favorites-grid {
        grid-template-columns: 1fr;
    }

    .tab-link {
        padding: 12px 15px;
        font-size: 14px;
    }

    .tab-icon {
        font-size: 16px;
    }

    .my-designs-header h2 {
        font-size: 24px;
    }

    .my-designs-header .description {
        font-size: 14px;
    }
}

/* Design Detail Modal Styles */
.nestoryai-design-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    font-family: inherit;
}

.nestoryai-design-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.nestoryai-design-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.nestoryai-design-modal .modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e8f4f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e8f4f8);
}

.nestoryai-design-modal .modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
}

.nestoryai-design-modal .modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.nestoryai-design-modal .modal-close:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: rotate(90deg);
}

.nestoryai-design-modal .modal-body {
    padding: 25px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3498db #f8f9fa;
}

.nestoryai-design-modal .modal-body::-webkit-scrollbar {
    width: 8px;
}

.nestoryai-design-modal .modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.nestoryai-design-modal .modal-body::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.nestoryai-design-modal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Design Information Section */
.design-info-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.design-info-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.design-info-table {
    width: 100%;
    border-collapse: collapse;
}

.design-info-table td {
    padding: 8px 0;
    vertical-align: top;
}

.design-info-table td:first-child {
    width: 120px;
    color: #7f8c8d;
}

.design-info-table code {
    background: #e8f4f8;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-processing {
    background: #cce5ff;
    color: #0066cc;
}

.status-badge.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Design Sections */
.design-section {
    margin-bottom: 30px;
}

.design-section:last-child {
    margin-bottom: 0;
}

.design-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #e8f4f8;
    padding-bottom: 8px;
}

/* Image Containers */
.image-container {
    text-align: center;
    margin-bottom: 15px;
}

.modal-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-image:hover {
    transform: scale(1.02);
}

/* Mask Image Overlay */
.mask-image-container {
    text-align: center;
}

.image-overlay-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.base-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.mask-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
    pointer-events: none;
}

.image-description {
    margin-top: 10px;
    color: #7f8c8d;
    font-size: 14px;
    font-style: italic;
}

/* Product and Custom Galleries */
.product-gallery,
.custom-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.product-item,
.custom-item {
    text-align: center;
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover,
.custom-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.product-image,
.custom-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 0 auto 8px;
    display: block;
}

.product-image:hover,
.custom-image:hover {
    transform: scale(1.1);
}

.product-name,
.custom-name {
    margin: 0;
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word;
    max-height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Error Section */
.error-section {
    border-left: 4px solid #e74c3c;
    background: #fdf2f2;
}

.error-message {
    background: #ffffff;
    border: 1px solid #f5c6cb;
    padding: 12px 15px;
    border-radius: 6px;
    color: #721c24;
    font-size: 14px;
    line-height: 1.4;
}

/* Modal Responsive Design */
@media (max-width: 768px) {
    .nestoryai-design-modal .modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    .nestoryai-design-modal .modal-header,
    .nestoryai-design-modal .modal-body {
        padding: 20px;
    }

    .nestoryai-design-modal .modal-body {
        max-height: calc(100vh - 100px);
    }

    .product-gallery,
    .custom-gallery {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .product-image,
    .custom-image {
        width: 70px;
        height: 70px;
    }

    .design-info-table td:first-child {
        width: 100px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nestoryai-design-modal .modal-header {
        padding: 15px;
    }

    .nestoryai-design-modal .modal-header h3 {
        font-size: 18px;
    }

    .nestoryai-design-modal .modal-body {
        padding: 15px;
    }

    .design-section h4 {
        font-size: 16px;
    }

    .product-gallery,
    .custom-gallery {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }

    .product-item,
    .custom-item {
        padding: 8px;
    }

    .product-image,
    .custom-image {
        width: 60px;
        height: 60px;
    }

    .product-name,
    .custom-name {
        font-size: 11px;
    }
}
.ai-credit-card {
    display: inline-flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    background: rgba(219, 210, 190, 0.6);
    border: 1px solid rgba(104, 50, 32, 0.28);
    border-radius: 8px;
    max-width: 240px;
    margin-top: 0.5rem;
}

.ai-credit-card .credit-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #683220;
}

.ai-credit-card .credit-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a56239;
}

.ai-credit-note {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #a03520;
}
