/* TAP PROFILE CONFIGURATION & MOCKUP STYLES */
/* ========== TAP PROFILE EDITOR REFACTOR ========== */
.tap-editor-header {
    aspect-ratio: 2 / 1;
    width: 100%;
    height: auto !important;
    position: relative;
    border-radius: var(--radius-md);
    overflow: visible;
    /* To allow profile pic to hang over */
    margin-bottom: 70px;
    /* Space for the overlaid profile photo */
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.tap-editor-header .cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.tap-profile-photo-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: var(--elevation-3);
    z-index: 10;
}

.tap-profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}


/* ========== TAP CONFIGURATION ========== */
.tap-config-logo {
    max-height: 100px;
    max-width: 250px;
}

.tap-config-cover-box {
    max-width: 400px;
    aspect-ratio: 2/1;
    width: 100%;
}

.color-picker-lg {
    width: 60px;
    height: 60px;
    padding: 0;
    border: 2px ridge #02a98a;
    border-radius: 10px !important;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.color-picker-lg::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-lg::-webkit-color-swatch {
    border: none;
}

.color-picker-lg:hover {
    transform: scale(1.05);
    border-color: var(--brand-primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}


/* ========== TAP CONFIGURATION SHAPES PREVIEW ========== */

.shape-btn-label {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    border: 2px solid var(--brand-muted, #EEEEEE) !important;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.shape-btn-label:hover {
    background: transparent !important;
    border-color: var(--brand-dark, #212529) !important;
}

.shape-btn-label:hover .shape-icon-preview {
    background-color: var(--brand-secondary, #c3534b) !important;
}

.btn-check:checked+.shape-btn-label {
    border-color: var(--brand-primary, #392c5b) !important;
    background: white !important;
}

.shape-icon-preview {
    width: 22px;
    height: 22px;
    background-color: color-mix(in srgb, var(--brand-secondary, #c3534b) 15%, transparent) !important;
    border: 2px solid var(--brand-secondary, #c3534b) !important;
}

.btn-check:checked+.shape-btn-label .shape-icon-preview {
    background-color: var(--brand-primary, #392c5b) !important;
    border-color: var(--brand-primary, #392c5b) !important;
}

.shape-icon-preview.circle-path {
    border-radius: 50%;
}

.shape-icon-preview.rounded-path {
    border-radius: 6px;
}

.shape-icon-preview.squircle-path {
    border-radius: 35%;
}

.shape-icon-preview.square-path {
    border-radius: 0;
}

.shape-icon-preview.portrait-path {
    width: 18px;
    height: 28px;
    border-radius: 4px;
}

.shape-icon-preview.landscape-path {
    width: 28px;
    height: 18px;
    border-radius: 4px;
}

.mockup-phone {
    width: 100%;
    max-width: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--brand-secondary-50);
}

.mockup-cover {
    aspect-ratio: 2 / 1;
    width: 100%;
    height: auto;
    background-size: cover;
    background-position: center;
    border-bottom: 2px ridge var(--brand-secondary);
}

.mockup-profile-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 2px ridge var(--brand-secondary);
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Photo Shapes (Mockup) */
.mockup-profile-photo.photo-shape-circle {
    border-radius: 50%;
}

.mockup-profile-photo.photo-shape-rounded {
    border-radius: 12px;
}

.mockup-profile-photo.photo-shape-squircle {
    border-radius: 35%;
}

.mockup-profile-photo.photo-shape-square {
    border-radius: 0;
}

.mockup-profile-photo.photo-shape-landscape {
    width: 130px !important;
    height: 86px !important;
    border-radius: 8px;
}

.mockup-profile-photo.photo-shape-portrait {
    width: 86px !important;
    height: 130px !important;
    border-radius: 8px;
}

.mockup-identity-group {
    margin: 0 11px;
    /* 15px * 0.75 = 11.25 ~ 11px */
    margin-top: 55px;
    /* Offset for floating profile photo */
    padding: 12px 12px 0 12px;
    /* 1rem (16px) * 0.75 = 12px */
    text-align: center;
}

.mockup-name {
    color: var(--brand-primary);
    font-size: 22px !important;
    font-weight: bold;
    margin-bottom: 2px;
}

.mockup-designation {
    color: var(--brand-secondary);
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 8px;
}

.mockup-enterprise-logo {
    width: auto;
    height: 28px;
    object-fit: contain;
    margin-right: 8px;
    border-radius: 1px;
}

.mockup-enterprise-name {
    font-weight: bold;
    font-size: 16px;
    color: var(--brand-primary);
}

.mockup-overview-heading {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 11px;
    text-align: left;
}

.mockup-overview {
    color: var(--text-color);
    text-align: justify;
    font-size: 10px;
    line-height: 1.4;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

.mockup-link-text.allow-wrap {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

/* Contact Link Row Flex (Mirror Public Split logic) */
.mockup-contact-row-flex {
    display: flex;
    gap: 8px;
    /* 10px * 0.75 = 7.5 ~ 8px */
    width: 100%;
}

.mockup-contact-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    /* 8px * 0.75 = 6px */
    width: 100%;
}

/* Standalone Branding Button (vCard Button) */
.mockup-vcard-btn {
    background-color: var(--brand-button-bg);
    color: var(--brand-button-text);
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 11px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.mockup-profile-card {
    background: transparent;
    border-radius: 9px;
    margin: 12px;
    margin-top: 0 !important;
    overflow: hidden;
    border: 1px solid var(--brand-secondary-50);
    text-align: left;
}

.mockup-profile-card-header {
    background: var(--brand-primary-05);
    padding: 6px 11px;
    /* 8x15 * 0.75 = 6x11 */
    border-bottom: 1px solid var(--brand-secondary-50);
}

.mockup-profile-card-header h6 {
    margin-bottom: 0 !important;
    font-size: 10.5px;
    /* 0.85rem (14) * 0.75 = 10.5px */
}

.mockup-profile-card-body {
    padding: 9px;
    /* 0.75rem (12px) * 0.75 = 9px */
    background: rgba(0, 0, 0, 0.02);
}

.mockup-overview-text {
    color: var(--text-color);
    text-align: justify;
    font-size: 10px;
    /* 13px * 0.75 = 9.75 ~ 10px */
    white-space: pre-line;
}

/* Mockup Contact Actions */
.mockup-contact-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 15px;
    /* 20px * 0.75 = 15px */
    margin-bottom: 6px;
    /* Reduced to align with high-fidelity gap logic */
}

.mockup-row-flex {
    display: flex;
    gap: 8px;
    width: 100%;
}

.mockup-social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
}

.mockup-link-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--brand-secondary-25);
    width: 100%;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}


.mockup-link-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-button-bg);
    color: var(--brand-button-text);
    font-size: 10px;
    flex-shrink: 0;
}

.mockup-link-text {
    font-weight: 500;
    font-size: 11px;
    color: var(--text-color, #000000);
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mockup-action-wrapper {
    margin-top: 10px;
}

.mockup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    background-color: var(--brand-button-bg);
    color: var(--brand-button-text);
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    width: 100%;
    transition: all 0.25s ease;
}


/* ========== TAP CONTENT DRAG & DROP ========== */
.drag-handle {
    cursor: grab;
    padding: 2px 5px;
    transition: color 0.2s;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:hover {
    color: var(--brand-primary) !important;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: var(--bg-glass-light) !important;
    border: 2px dashed var(--brand-primary) !important;
}

.tap-drag-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.5rem !important;
    border: 1px solid var(--border-glass-light) !important;
    border-radius: var(--radius-sm) !important;
    margin-bottom: 0.5rem !important;
    background-color: var(--bg-glass-light) !important;
    transition: all 0.2s ease-in-out;
}

.tap-drag-item:hover {
    box-shadow: var(--elevation-2);
    border-color: var(--brand-secondary) !important;
}

.tap-drag-item:last-child {
    margin-bottom: 0 !important;
}

/* ========== TAP GRID CARD (Generalized for Media Items) ========== */
.tap-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.tap-media-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .tap-media-grid-2 {
        grid-template-columns: 1fr;
    }
}

.tap-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .tap-service-grid {
        grid-template-columns: 1fr;
    }
}

.tap-grid-card-footer {
    padding: 0 0.75rem 0.4rem !important;
}

.tap-media-grid-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.tap-grid-card {
    border: 1px solid var(--border-glass-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-glass-light);
    transition: all 0.2s ease-in-out;
    display: flex !important;
    flex-direction: column;
    height: 100%;
}

.tap-grid-card:hover {
    box-shadow: var(--elevation-2);
    border-color: var(--brand-secondary);
}

.tap-grid-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-glass-light);
}

.tap-grid-card-body {
    padding: 3px 5px;
    background-color: transparent;
    flex-grow: 1;
}

#sectionItems_image .tap-grid-card-body img,
#sectionItems_video .tap-grid-card-body video {
    aspect-ratio: 16 / 9;
}

.tap-grid-card-body img,
.tap-grid-card-body video {
    width: 100%;
    margin: 0;
    background-color: rgba(255, 255, 255, 0.25);
    object-fit: contain;
    display: block;
}

.tap-grid-card-body img {
    border: 1px solid var(--border-glass-light);
    border-radius: 5px;
}

.tap-grid-card-footer {
    padding: 0.25rem;
    border-top: none;
    display: flex;
    justify-content: center;
    margin-top: auto;
}

/* Service-specific Grid Item Styles (Renamed for clarity & Clean CSS) */
.service-grid-content {
    padding: 8px 5px 0 5px;
}


.service-grid-desc {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 4px;
    display: block;
    overflow: visible;
    text-align: justify;
    overflow-wrap: break-word;
    word-break: break-word;
}

.service-grid-price {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-primary);
}

.grid-span-full {
    grid-column: 1 / -1;
}

/* ========== VIDEO PREVIEW LAYOUT ========== */
.video-preview-wrapper {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-secondary-50);
    transition: all 0.3s ease;
}

.video-preview-wrapper:hover {
    border-style: ridge;
    border-color: var(--brand-secondary);
}

.video-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-preview-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-preview-wrapper:hover img {
    transform: scale(1.05);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.video-preview-wrapper:hover .play-button-overlay {
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-preview-wrapper.ratio-16-9 {
    aspect-ratio: 16/9;
}

.video-preview-wrapper.ratio-9-16 {
    aspect-ratio: 9/16;
    margin: 0 auto;
    max-height: 250px;
}

/* ========== TAP PROFILE EDITOR REFACTOR ========== */
.item-section-label {
    font-weight: 600;
    color: var(--brand-primary);
    font-size: 0.85rem;
}

.btn-brand-mockup {
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    pointer-events: none;
    line-height: 1.5;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.btn-brand-mockup span.text-truncate {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== TAP MOCKUP REFACTOR (DYNAMIC GRID & FLOATING BUTTON) ========== */
.mockup-contact-social-icons-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 5px;
}

.mockup-social-icon-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brand-button-bg);
    color: var(--brand-button-text);
    font-size: 0.9rem;
    border: 1px ridge var(--brand-secondary);
}

/* Mockup Floating Action Buttons Wrapper */
.mockup-floating-actions {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.mockup-floating-btn {
    background-color: var(--brand-button-bg);
    color: var(--brand-button-text);
    border: none;
    border-radius: 50px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.mockup-share-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--brand-button-bg);
    color: var(--brand-button-text);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    font-size: 0.7rem;
}
