/* ============================================
   General Admin Area
   ============================================ */

.cutelinks-admin-wrap {
    max-width: 1200px;
    margin: 20px auto;
    background: #f1f1f1;
    padding: 0 20px 40px;
}

/* Page Header with Logo */
.cutelinks-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.cutelinks-page-header .cutelinks-logo {
    height: 40px;
    width: auto;
    display: block;
}

.cutelinks-page-header h1 {
    margin: 0;
    font-weight: 600;
    font-size: 2rem;
}

/* ============================================
   Stats Cards
   ============================================ */

.cutelinks-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cutelinks-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 20px 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e5e5;
}

.cutelinks-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.cutelinks-stat-card .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #0073aa;
    background: #e5f1fa;
    border-radius: 8px;
    padding: 8px;
    box-sizing: content-box;
}

.cutelinks-stat-card .stat-content {
    flex: 1;
}

.cutelinks-stat-card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #555;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.cutelinks-stat-card p {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1e1e2a;
    line-height: 1.2;
}

/* ============================================
   Add/Edit Form Card
   ============================================ */

.cutelinks-form-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e5e5e5;
}

.cutelinks-form-card h2 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    font-weight: 500;
    color: #1e1e2a;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.cutelinks-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
    margin-bottom: 20px;
}

@media (max-width: 782px) {
    .cutelinks-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-group .regular-text {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.form-group .regular-text:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.slug-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    background: #fcfcfc;
    transition: border-color 0.15s ease;
}

.slug-input-wrapper:focus-within {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.slug-prefix {
    padding: 8px 10px 8px 14px;
    background: #f0f0f0;
    border-right: 1px solid #d5d5d5;
    border-radius: 6px 0 0 6px;
    color: #555;
    font-size: 14px;
    white-space: nowrap;
}

.slug-input-wrapper .slug-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    flex: 1;
    min-width: 0;
}

.slug-input-wrapper .slug-input:focus {
    box-shadow: none;
    border-color: transparent;
}

/* ============================================
   Follow / Redirect Settings
   ============================================ */

.follow-type-selection {
    background: #f9f9f9;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 10px 0 20px;
    border: 1px solid #e9e9e9;
}

.settings-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-group > label:first-child {
    font-weight: 600;
    color: #1e1e2a;
    margin-bottom: 4px;
}

.setting-group label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
}

.setting-group input[type="radio"] {
    margin: 0;
    cursor: pointer;
    accent-color: #0073aa;
}

.form-submit {
    margin-top: 10px;
    text-align: right;
}

#cutelinks_submit {
    padding: 8px 30px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
}

/* ============================================
   Links List Section
   ============================================ */

.cutelinks-list-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e5e5e5;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.list-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 500;
    color: #1e1e2a;
}

.cute-links-search-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

#search-cute-links {
    padding: 8px 14px;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    font-size: 14px;
    width: 220px;
    transition: border-color 0.15s ease;
}

#search-cute-links:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

#cute-links-search-btn {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #d5d5d5;
    background: #f7f7f7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cute-links-search-btn .dashicons {
    font-size: 18px;
    color: #555;
}

#cute-links-search-btn:hover {
    background: #eee;
}

/* ============================================
   Table Styles
   ============================================ */

.cute-links-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.cute-links-table th {
    background: #f7f7f7;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #1e1e2a;
    border-bottom: 2px solid #e5e5e5;
}

.cute-links-table td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.cute-links-table tbody tr:hover td {
    background-color: #fafafa;
}

.cute-links-table .no-items {
    text-align: center;
    padding: 30px 0;
    color: #888;
    font-style: italic;
}

/* ---- Affiliate Link Column Truncation (cell only) ---- */
.affiliate-link-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affiliate-link-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Header: no restrictions */
.affiliate-link-header {
    /* no max-width, no white-space: nowrap */
}

/* Follow Type and Redirect Type cells */
.follow-type-header,
.redirect-type-header,
.clicks-header,
.actions-header {
    text-align: center;
}

.follow-type-cell,
.redirect-type-cell,
.clicks-cell,
.actions-cell {
    text-align: center;
    padding: 12px 8px;
}

.follow-type-cell {
    font-weight: 600;
}
.follow-type-nofollow {
    color: #d63638;
}
.follow-type-dofollow {
    color: #00a32a;
}

.redirect-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 45px;
    letter-spacing: 0.3px;
}

.redirect-301 {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.redirect-302 {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffb74d;
}
.redirect-307 {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* Action buttons */
.cute-links-table .button-small {
    margin: 0 4px 0 0;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.6;
    border-radius: 4px;
    background: #f0f0f1;
    border: 1px solid #d5d5d5;
    color: #333;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cute-links-table .button-small .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
}

.cute-links-table .button-small:hover {
    background: #e0e0e1;
    border-color: #b5b5b5;
}

.edit-cutelink {
    background: #e5f1fa !important;
    border-color: #b0d0e8 !important;
    color: #0073aa !important;
}
.edit-cutelink:hover {
    background: #c8e0f3 !important;
    border-color: #8bb8d8 !important;
}

.delete-cutelink {
    background: #fce8e8 !important;
    border-color: #e6b3b3 !important;
    color: #d63638 !important;
}
.delete-cutelink:hover {
    background: #fad0d0 !important;
    border-color: #d99 !important;
}

.copy-cutelink {
    background: #f0f8f0 !important;
    border-color: #b5d9b5 !important;
    color: #2e7d32 !important;
}
.copy-cutelink:hover {
    background: #dff0df !important;
    border-color: #99c799 !important;
}

/* Copy animation */
.copy-animation {
    position: absolute;
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
    margin-left: 6px;
    background: #e8f5e9;
    padding: 2px 8px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    pointer-events: none;
}

/* ============================================
   Pagination
   ============================================ */

.tablenav {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.tablenav-pages .page-numbers {
    padding: 6px 12px;
    margin: 0 2px;
    border-radius: 4px;
    background: #f0f0f1;
    border: 1px solid #d5d5d5;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    display: inline-block;
}

.tablenav-pages .page-numbers.current {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.tablenav-pages .page-numbers:hover:not(.current) {
    background: #e0e0e1;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media screen and (max-width: 782px) {
    .cutelinks-stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .cutelinks-stat-card {
        padding: 15px;
    }
    
    .cutelinks-stat-card .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
        padding: 6px;
    }
    
    .cutelinks-stat-card p {
        font-size: 22px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    #search-cute-links {
        width: 100%;
    }
    
    .cute-links-table th,
    .cute-links-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .cute-links-table .button-small {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .settings-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .slug-input-wrapper {
        flex-wrap: wrap;
    }
    
    .slug-prefix {
        border-radius: 6px 6px 0 0;
        border-right: none;
        border-bottom: 1px solid #d5d5d5;
        width: 100%;
        text-align: center;
    }
    
    .slug-input-wrapper .slug-input {
        border-radius: 0 0 6px 6px;
    }
}

@media screen and (max-width: 480px) {
    .cutelinks-stats-container {
        grid-template-columns: 1fr;
    }

    /* Reduce truncation width on very small screens */
    .affiliate-link-cell {
        max-width: 120px;
    }
}

/* ============================================
   Go Pro Page Styles
   ============================================ */

.cutelinks-gopro-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Gradient Blur Background Effect */
.cutelinks-gopro-wrapper::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(103,58,183,0.3), rgba(63,81,181,0.3));
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
}

.cutelinks-gopro-wrapper::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: linear-gradient(225deg, rgba(233,30,99,0.25), rgba(156,39,176,0.25));
    border-radius: 50%;
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
}

.cutelinks-gopro-header {
    text-align: center;
    padding: 40px 20px 20px;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.9);
}

.cutelinks-gopro-header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #1e1e2a;
}

.cutelinks-gopro-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

.cutelinks-gopro-container {
    padding: 20px 30px 40px;
    position: relative;
    z-index: 1;
}

/* Comparison Table Styles */
.cutelinks-comparison-table {
    margin-bottom: 50px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.95);
}

.cutelinks-comparison-grid {
    display: flex;
    flex-direction: column;
}

.comparison-row {
    display: flex;
    border-bottom: 1px solid #eee;
    transition: background 0.2s ease;
}

.comparison-row:hover {
    background: #faf9ff;
}

.comparison-row.header {
    background: linear-gradient(135deg, #1e1e2a, #2d2d44);
    color: #fff;
    font-weight: bold;
    border-bottom: none;
}

.comparison-cell {
    flex: 2;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-cell.free-cell,
.comparison-cell.pro-cell {
    flex: 1;
    justify-content: center;
}

.feature-cell {
    font-weight: 500;
    color: #333;
}

.free-cell .dashicons,
.pro-cell .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.free-cell .dashicons-yes-alt {
    color: #00a32a;
}

.free-cell .dashicons-dismiss {
    color: #ccc;
}

.pro-cell .dashicons-yes-alt {
    color: #8b5cf6;
    filter: drop-shadow(0 0 3px rgba(139,92,246,0.5));
}

/* Pro Column Gradient Blur Effect */
.pro-cell {
    background: linear-gradient(120deg, rgba(139,92,246,0.08), rgba(99,102,241,0.05));
    position: relative;
}

/* CTA Section - Main Gradient Blur Effect */
.cutelinks-gopro-cta {
    position: relative;
    background: linear-gradient(135deg, #f5f0ff, #e9e4ff);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    overflow: hidden;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cta-glow {
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(139,92,246,0.2), rgba(99,102,241,0.05));
    filter: blur(60px);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    padding: 8px 20px;
    border-radius: 40px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255,65,108,0.3);
}

.discount-percent {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.cutelinks-gopro-cta h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #1e1e2a;
}

.price {
    margin: 20px 0;
}

.old-price {
    font-size: 1.5rem;
    text-decoration: line-through;
    color: #888;
    margin-right: 15px;
}

.new-price {
    font-size: 2.8rem;
    font-weight: bold;
    color: #2d2d44;
    margin-right: 10px;
}

.per-year {
    font-size: 1rem;
    color: #555;
}

.saving-text {
    color: #10b981;
    font-weight: 500;
    margin-bottom: 25px;
}

.cutelinks-upgrade-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border: none;
    padding: 14px 32px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 40px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: #fff !important;
    text-decoration: none;
    display: inline-block;
    margin: 15px 0;
}

.cutelinks-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.4);
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
}

.guarantee-text {
    font-size: 0.85rem;
    color: #555;
    margin-top: 10px;
}

/* Mobile Responsive for Go Pro Page */
@media (max-width: 768px) {
    .comparison-cell {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    .feature-cell {
        flex: 2.5;
    }
    .cutelinks-gopro-container {
        padding: 15px;
    }
    .cutelinks-gopro-cta h2 {
        font-size: 1.3rem;
    }
    .new-price {
        font-size: 2rem;
    }
    .cutelinks-upgrade-btn {
        padding: 10px 24px;
        font-size: 1rem;
    }
}