/**
 * Link Bundle Styles
 */

/* Expert Mode Toggle */
.expert-mode-fields {
    display: none !important;
}

.expert-mode-fields.visible {
    display: block !important;
}

.url-section-selector {
    display: none !important;
}

body.expert-mode-enabled .url-section-selector {
    display: block !important;
}

/* Global Styles - add CSS variables for theming */
:root {
    --primary-color: #4a6cf7;
    --accent-color: #3a5ce5;
    --bg-color: #ffffff;
    --secondary-color: #f7fafc;
    --text-color: #2d3748;
    --light-text: #4a5568;
    --border-radius: 8px;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --success-color: #48bb78;
    --disabled-color: #edf2f7;
    --coming-soon-color: #ff6b35;
    --warning-color: #f6ad55;
}

/* Form Container */
.link-bundle-form {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Card Styles */
.bundle-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.bundle-card-header {
    padding: 20px;
    background-color: rgba(74, 108, 247, 0.05);
    border-bottom: 1px solid rgba(74, 108, 247, 0.1);
}

.bundle-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bundle-card-icon {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.bundle-card-body {
    padding: 20px;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-required {
    color: #e53e3e;
    margin-left: 3px;
}

.form-input, 
.form-select, 
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-input:focus, 
.form-select:focus, 
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 14px;
    color: var(--light-text);
    margin-top: 5px;
}

/* URL Input Area */
.url-input-container {
    position: relative;
}

.urls-container {
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.url-input-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 15px;
    align-items: center;
}

.url-input-row:last-child {
    border-bottom: none;
}

.url-number {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.url-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.url-remove {
    margin-left: 10px;
    background: #f56565;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.url-remove:hover {
    background: #e53e3e;
}

.add-url-btn {
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
}

.add-url-btn:hover {
    opacity: 0.9;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-label {
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.expert-mode-text {
    font-size: 14px;
    color: var(--light-text);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-color);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

/* Duration Options */
.duration-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.duration-option {
    flex: 1;
    min-width: 120px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.duration-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.05);
}

.duration-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--disabled-color);
}

.duration-days {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.duration-tier {
    font-size: 14px;
    color: var(--light-text);
}

.premium-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 5px;
}

/* Theme Selection Options */
.theme-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.theme-option {
    flex: 1;
    min-width: 120px;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.theme-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.theme-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--disabled-color);
}

.theme-sample {
    height: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.theme-option.theme-default .theme-sample {
    background: linear-gradient(to right, #4a6cf7, #3a5ce5);
}

.theme-option.theme-dark .theme-sample {
    background: linear-gradient(to right, #212121, #424242);
    border: 1px solid #4a6cf7;
}

.theme-option.theme-green .theme-sample {
    background: linear-gradient(to right, #38a169, #2f855a);
}

.theme-option.theme-purple .theme-sample {
    background: linear-gradient(to right, #805ad5, #6b46c1);
}

.theme-option.theme-custom .theme-sample {
    background: linear-gradient(to right, #ed8936, #dd6b20);
}

.theme-option:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.theme-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.theme-description {
    font-size: 14px;
    color: var(--light-text);
}

/* Section Management */
.section-management {
    margin-bottom: 25px;
}

.section-list {
    margin-bottom: 20px;
}

.section-item {
    background-color: rgba(74, 108, 247, 0.05);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 10px;
}

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

.section-title {
    font-weight: 600;
    color: var(--primary-color);
}

.section-actions {
    display: flex;
    gap: 10px;
}

.section-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
}

.section-delete {
    background-color: #f56565;
}

.section-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light-text);
    font-size: 14px;
}

.url-count-badge {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.new-section-form {
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
}

.url-assign-list {
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.url-assign-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.url-assign-item:last-child {
    border-bottom: none;
}

.url-assign-checkbox {
    margin-right: 10px;
}

.url-assign-label {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Custom Header Styling - Commented out since WordPress header is used 
.header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--light-text);
    font-size: 18px;
}
*/

/* Bundle Display Styles */
.bundle-header {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.bundle-title {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.bundle-description {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.layout-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.layout-btn {
    background: var(--secondary-color);
    border: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.layout-btn.active {
    background: var(--primary-color);
    color: white;
}

.bundle-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    transition: var(--transition);
}

.bundle-content.list-view {
    grid-template-columns: 1fr;
}

.link-card {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* No image styling */
.link-card.no-image {
    height: auto;
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
}

.icon-text {
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.link-image {
    height: 150px;
    position: relative;
    background-color: #f0f0f0;
    overflow: hidden;
}

.link-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.bundle-content.list-view .link-image {
    height: 100px;
    width: 200px;
    float: left;
    margin-right: 20px;
}

.link-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bundle-content.list-view .link-card {
    flex-direction: row;
    align-items: center;
}

.bundle-content.list-view .link-info {
    padding: 20px;
    height: auto;
}

.link-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.link-url {
    font-size: 0.85rem;
    color: var(--light-text);
    word-break: break-all;
    margin-bottom: 10px;
}

.link-btn {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    margin-top: auto;
    text-align: center;
}

.link-btn:hover {
    background-color: var(--accent-color);
}

.bundle-footer {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow);
    text-align: center;
}

.open-all-btn {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.open-all-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.expiry-info {
    background-color: var(--secondary-color);
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.bundle-branding {
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--light-text);
}

/* QR Code and share styles */
.share-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.qr-container {
    text-align: center;
}

.qr-code {
    max-width: 120px;
    display: block;
    margin: 0 auto 5px auto;
}

.qr-label {
    font-size: 14px;
    color: var(--light-text);
    display: block;
    margin-bottom: 5px;
}

.qr-download-link {
    display: inline-block;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 12px;
    transition: var(--transition);
}

.qr-download-link:hover {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
}

.url-container {
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 8px;
    width: 100%;
    max-width: 400px;
}

.bundle-url {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 5px;
    font-size: 14px;
    color: var(--text-color);
}

.copy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

/* Group Header */
.group-header {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 20px 0 15px 0;
    box-shadow: var(--shadow);
}

.group-title {
    font-size: 20px;
    color: var(--primary-color);
}

/* Premium Features Section */
.premium-features-card,
.premium-features-header,
.premium-features-body {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
}

.premium-features-header {
    padding: 20px;
    background-color: rgba(74, 108, 247, 0.05); /* Match primary color */
    border-bottom: 1px solid rgba(74, 108, 247, 0.1);
}

.premium-features-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

.premium-features-body {
    padding: 20px;
}

.premium-feature-item {
    background-color: var(--disabled-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    opacity: 0.7;
    cursor: not-allowed;
}

.premium-feature-item:last-child {
    margin-bottom: 0;
}

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

.premium-feature-title {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.premium-feature-icon {
    width: 30px;
    height: 30px;
    background-color: rgba(74, 108, 247, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-weight: bold;
}

.premium-badge-large {
    background-color: var(--primary-color);
    color: white;
    font-size: 14px;
    padding: 5px 12px;
    border-radius: 20px;
}

.premium-feature-controls {
    margin-top: 10px;
    opacity: 0.7;
}

/* Notifications */
.notification {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.notification-success {
    background-color: #c6f6d5;
    color: #2f855a;
}

.notification-error {
    background-color: #fed7d7;
    color: #c53030;
}

/* Password Protection Form */
.password-form {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 50px auto;
    text-align: center;
}

.password-form-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.password-form-description {
    margin-bottom: 20px;
    color: var(--light-text);
}

.password-form-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

.password-form-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.password-error {
    color: #e53e3e;
    margin-top: 10px;
}

/* Expired Bundle Template */
.expired-container {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 50px auto;
    text-align: center;
}

.expired-icon {
    font-size: 48px;
    color: #e53e3e;
    margin-bottom: 20px;
}

.expired-title {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.expired-message {
    margin-bottom: 20px;
    color: var(--light-text);
}

.create-new-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 12px 25px;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
}

/* Theme Preview Classes */
body.theme-preview-dark {
    --primary-color: #4a6cf7;
    --accent-color: #3a5ce5;
    --bg-color: #1a1a1a;
    --secondary-color: #2a2a2a;
    --text-color: #e0e0e0;
    --light-text: #b0b0b0;
}

body.theme-preview-green {
    --primary-color: #38a169;
    --accent-color: #2f855a;
    --bg-color: #f0fff4;
    --secondary-color: #e6ffec;
    --text-color: #2d3748;
    --light-text: #4a5568;
}

body.theme-preview-purple {
    --primary-color: #9f7aea;
    --accent-color: #805ad5;
    --bg-color: #faf5ff;
    --secondary-color: #f5f0ff;
    --text-color: #2d3748;
    --light-text: #4a5568;
}

/* Coming Soon Tags and Badges */
.coming-soon-tag {
    display: inline-block;
    background-color: var(--coming-soon-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coming-soon-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--coming-soon-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* Premium Badge Updates */
.premium-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--warning-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.premium-badge-large {
    background-color: var(--warning-color);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pro Feature Tag */
.pro-feature-tag {
    color: var(--coming-soon-color);
    font-size: 12px;
    font-weight: bold;
}

/* Disabled Elements Styling */
input:disabled, 
select:disabled, 
textarea:disabled {
    background-color: var(--disabled-color) !important;
    color: #a0aec0 !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

.form-group:has(input:disabled) .form-label,
.form-group:has(select:disabled) .form-label,
.form-group:has(textarea:disabled) .form-label {
    color: #a0aec0;
}

/* Expert Mode Permission Denied */
#expert-mode-fields[data-permission="denied"] {
    display: none !important;
}

/* Theme Option Updates */
.theme-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.theme-option.disabled::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 5;
}

/* Responsive */
@media (max-width: 768px) {
    .duration-options,
    .theme-options {
        flex-direction: column;
    }
    
    .duration-option,
    .theme-option {
        width: 100%;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .bundle-content {
        grid-template-columns: 1fr;
    }
    
    .bundle-content.list-view .link-card {
        flex-direction: column;
    }
    
    .bundle-content.list-view .link-image {
        width: 100%;
        margin-right: 0;
    }
}