/* AEM Labs Limited - Seller Dashboard Shop Settings CSS */
/* ===================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 90%;
    margin: 0 auto 32px;
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* Content Cards */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
}

.card-title-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-title {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    margin: 0;
}

.card-subtitle {
    font-size: 12px;
    color: #6c757d;
}

.filter-select {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    font-size: 11px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(105, 7, 197, 0.1);
}

.card-content {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Form */
.form-section {
    padding: 22px;
    border-bottom: 1px solid #f1f3f4;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    position: relative;
    flex: 1;
}

.form-group.full-width {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

#shop-policies .form-row {
    padding: 12px 0 24px;
}

.form-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    height: fit-content;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
}

.form-control {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    color: #495057;
    background: white;
    width: 100%;
    resize: vertical;
}

.form-control.block {
    filter: grayscale(100%);
    opacity: 0.85;
    cursor: not-allowed;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-help {
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.character-counter {
    font-size: 11px;
    color: #6c757d;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.character-counter.warning {
    color: #f59e0b;
}

.character-counter.danger {
    color: #ef4444;
}

.form-control.invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-control.valid {
    border-color: #28a745;
    background-color: #f0fff4;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.editor-note {
    font-size: 14px;
    font-weight: 600;
    color: #3d3d3d;
    border-radius: 8px;
    padding: 8px 12px;
    background-color: rgba(var(--accent-color-rgb), 0.1);
    border: 2px dashed rgba(var(--accent-color-rgb), 0.75);
}

.editor-note i {
    color: var(--accent-color);
    margin-right: 6px;
}

/* Radio Buttons */
.radio-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    flex: 1;
}

.radio-box:hover {
    border-color: var(--accent-color);
    background: #f8fafc;
}

.radio-box i {
    font-size: 18px;
    color: var(--accent-color);
}

.radio-box label {
    flex: 1;
    cursor: pointer;
}

.radio-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-info h4 {
    font-size: 12px;
    font-weight: 600;
    color: #212529;
}

.radio-info p {
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
    margin: 0;
}

#public-seller-id.radio-box {
    align-items: center;
    gap: 16px;
}

#public-seller-id.radio-box i {
    font-size: 22px;
}

#public-seller-id.radio-box label {
    flex: 1;
}

#public-seller-id .radio-info h4 {
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: linear-gradient(270deg, #a71c1c, #6907c5);
    box-shadow: 0 0 8px rgba(var(--accent-color-rgb), 0.25);
    padding: 4px 8px;
    border-radius: 20px;
    width: fit-content;
}

/* Image Upload Box */
.upload-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: #fafbfc;
    position: relative;
    overflow: visible;
}

.upload-box:hover {
    border-color: var(--accent-color);
    background: #f8fafc;
    cursor: pointer;
}

.upload-box.dragover {
    border-color: var(--accent-color);
    background: #eff6ff;
}

.upload-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.upload-info p {
    font-size: 11px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 6px;
}

.upload-info small {
    font-size: 10px;
    font-weight: 500;
    color: #adb5bd;
}

.upload-box i {
    font-size: 32px;
    color: var(--accent-color);
}

.upload-box.has-image {
    border: 2px solid var(--accent-color);
    background: white;
}

.image-preview-container {
    position: relative;
    width: 160px;
    height: 100px;
    border-radius: 8px;
    overflow: visible;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.image-preview-container .preview-image {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    opacity: 0;
    transition: 0.3s ease;
    pointer-events: none;
}

.image-preview-container:hover .preview-overlay {
    opacity: 1;
}

.preview-btn i {
    font-size: 18px;
    color: white;
}

.remove-btn i {
    color: white;
    font-size: 14px;
}

.preview-btn,
.remove-btn {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.preview-btn {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: transparent;
}

.preview-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.remove-btn:hover {
    color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Selected Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.image-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.image-modal .close-btn:hover {
    opacity: 0.7;
}

.image-modal .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.image-modal .nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-modal .nav-btn.prev {
    left: 30px;
}

.image-modal .nav-btn.next {
    right: 30px;
}

.image-modal .counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 10001;
}

/* Business Tag Selection */
.tag-selection-container {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    background: white;
    min-height: 45px;
}

.tag-selection-container:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 20px;
}

.selected-tags:empty {
    margin-bottom: 0;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.selected-tag .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.selected-tag .remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tag-dropdown {
    position: relative;
}

.tag-dropdown-btn {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tag-dropdown-btn:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
}

.tag-dropdown-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.tag-dropdown-btn.active i {
    transform: rotate(180deg);
}

.tag-dropdown-menu {
    position: relative;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.tag-dropdown-menu.active {
    display: block;
}

.tag-option {
    padding: 8px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tag-option:hover {
    background: #f3f4f6;
}

.tag-option.selected {
    background: #eff6ff;
    color: var(--accent-color);
    font-weight: 500;
}

.tag-option.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    background: #f9fafb;
}

/* Shop Policies */
#shop-policies .form-col {
    border-bottom: 1px solid #e2e8f0;
    gap: 24px;
    padding-bottom: 24px;
}

#shop-policies .form-col:last-of-type {
    border-bottom: none;
}

.policy-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.policy-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #6907c5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(105, 7, 197, 0.2);
}

.policy-icon i {
    font-size: 16px;
    color: white;
}

.policy-title h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.policy-title p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

/* --- Global Responsiveness Start --- */
@media (max-width: 1440px) {
    .dashboard-grid {
        width: 100%;
    }
    
    #shop-policies .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 0 0 12px;
    }
}

@media (max-width: 992px) {
    #shop-policies .policy-header {
        justify-content: space-between;
        flex-direction: row-reverse;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }

    #shop-policies .form-row {
        grid-template-columns: 1fr;
    }
    
    .card-title-container {
        gap: 4px;
    }

    .card-title {
        font-size: 14px;
        font-weight: 700;
    }

    .card-subtitle {
        font-size: 10px;
    }
}

/* --- Global Responsiveness End --- */