/* ADMIN SIDE SETTINGS */
.color-group-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 120px;
    flex: 0 1 auto;
}

.color-bar-input {
    position: relative;
    height: 2.5rem;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.color-bar-input input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 150%;
    height: 150%;
    position: absolute;
    top: -25%;
    left: -25%;
    cursor: pointer;
    background: none;
}

.upload-zone {
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='12' ry='12' stroke='%23CBD5E1FF' stroke-width='2' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    transition: all 0.2s;
}

.remove-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: #ef4444;
    color: white;
    padding: 0.35rem;
    border-radius: 9999px;
    display: none;
    z-index: 10;
    border: none;
}

.has-image .remove-btn {
    display: block;
}



.radius-option.selected {
    background-color: white;
    color: var(--color-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* OTHER PAGES & GLOBAL UI */
html {
    scroll-behavior: smooth;
}

.custom-scroll::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: var(--color-bg, #f8fafc);
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: var(--color-secondary, #cbd5e1);
    border-radius: 4px;
    opacity: 0.5;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary, #94a3b8);
}

.nav-item {
    position: relative;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--color-secondary, #64748b);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: var(--color-bg, #f8fafc);
    color: var(--color-textMain, #0f172a);
    transform: translateX(4px);
}

.nav-link.active {
    background-color: rgba(var(--color-primary-rgb), 0.1);
    color: var(--color-primary, #ea580c);
}

.nav-link.active svg {
    color: var(--color-primary, #ea580c);
}

.submenu-link {
    display: block;
    padding: 0.6rem 1rem 0.6rem 2.75rem;
    font-size: 0.8125rem;
    color: var(--color-secondary, #64748b);
    border-radius: 0.5rem;
    transition: all 0.15s;
    position: relative;
}

.submenu-link::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--color-secondary, #cbd5e1);
    transition: all 0.2s;
}

.submenu-link:hover {
    color: var(--color-textMain, #0f172a);
    background-color: var(--color-bg, #f1f5f9);
}

.submenu-link.active {
    color: var(--color-primary, #ea580c);
    background-color: #fff;
    font-weight: 600;
}

.submenu-link.active::before {
    background-color: var(--color-primary, #ea580c);
    width: 6px;
    height: 6px;
}

.success-overlay {
    transition: opacity 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}



/* style.css - Responsive Branding */

.upload-zone {
    /* Mobile par dashed border ko thoda patla kiya */
    border: 2px dashed #e2e8f0;
    background-image: none !important;
    /* SVG background hata diya simpler border ke liye */
}

.upload-zone:hover {
    border-color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.02);
}

/* Preview Image container fix */
#logo-preview-container img {
    max-height: 50px;
    /* Logo mobile par zyada bada na ho */
    width: auto;
    object-fit: contain;
}

#favicon-preview-container img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}



/* Remove button mobile par thoda chota */
@media (max-width: 640px) {
    .remove-btn {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem;
    }

    .color-group-item {
        min-width: 120px;
    }

    .color-bar-input {
        height: 2.5rem;
    }

    #section-typography .color-bar-input {
        height: 2.5rem;
    }

    .preview-th,
    .preview-td {
        padding: 0.5rem 0.75rem !important;
        /* Compact cells */
    }

    .btn-preview-card button {
        padding: 0.5rem 0.25rem !important;
        font-size: 10px !important;
    }
}



/* Choti screen par title ko overflow hone se rokne ke liye */
@media (max-width: 556px) {
    .header-title {
        font-size: 1.1rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
}