/**
 * Job House India - Swipable Job Match Deck Styles (Jeevansathi / Shaadi.com Style)
 * Pure Minimalist Light Theme: White, Black, Clean Borders, Fluid Animations
 */

.jhi-match-app {
    min-height: calc(100vh - 72px);
    background: #fafafa;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Topbar */
.jhi-match-topbar {
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 12px 0;
    position: sticky;
    top: 72px;
    z-index: 40;
}
.jhi-match-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.jhi-match-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.jhi-match-spark {
    font-size: 16px;
    color: #111111;
}
.jhi-match-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111111;
}
.jhi-match-title em {
    font-style: normal;
    color: #666666;
    font-weight: 400;
}
.jhi-match-badge {
    background: #f0f0f0;
    color: #111111;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e0e0e0;
}
.jhi-match-counters {
    display: flex;
    align-items: center;
    gap: 16px;
}
.jhi-deck-counter {
    font-size: 13px;
    color: #666666;
    font-weight: 500;
}
.jhi-liked-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #111111;
    color: #111111;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.jhi-liked-btn:hover {
    background: #000000;
    color: #ffffff;
}
.jhi-liked-count {
    background: #000000;
    color: #ffffff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
}
.jhi-liked-btn:hover .jhi-liked-count {
    background: #ffffff;
    color: #000000;
}

/* Filter Strip */
.jhi-match-filters-wrap {
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    padding: 10px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.jhi-match-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.jhi-filter-pill {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #444444;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}
.jhi-filter-pill:hover {
    border-color: #111111;
    color: #111111;
}
.jhi-filter-pill.is-active {
    background: #111111;
    border-color: #111111;
    color: #ffffff;
    font-weight: 600;
}

/* Stage Wrap */
.jhi-match-stage-wrap {
    flex: 1;
    padding: 24px 0 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.jhi-match-stage-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Desktop Hints */
.jhi-deck-hints {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #888888;
}
.jhi-deck-hints kbd {
    background: #ffffff;
    border: 1px solid #cccccc;
    box-shadow: 0 1px 0 rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: inherit;
    color: #222222;
}
@media (max-width: 768px) {
    .jhi-deck-hints { display: none; }
    .jhi-match-stage-wrap { padding: 12px 0 20px; }
}

/* Viewport for Stacked Cards */
.jhi-card-deck-viewport {
    position: relative;
    width: 100%;
    height: 520px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}
@media (max-width: 480px) {
    .jhi-card-deck-viewport {
        height: 480px;
    }
}

/* Individual Swipe Card */
.jhi-swipe-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1px solid #111111;
    border-radius: 18px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    cursor: grab;
    will-change: transform, opacity;
    transform-origin: 50% 100%;
    touch-action: none;
    box-sizing: border-box;
}
.jhi-swipe-card:active {
    cursor: grabbing;
}

/* Stack Stacking Levels */
.jhi-swipe-card--stack-0 {
    z-index: 10;
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
}
.jhi-swipe-card--stack-1 {
    z-index: 9;
    transform: translate3d(0, 12px, 0) scale(0.96);
    opacity: 0.92;
    pointer-events: none;
}
.jhi-swipe-card--stack-2 {
    z-index: 8;
    transform: translate3d(0, 24px, 0) scale(0.92);
    opacity: 0.7;
    pointer-events: none;
}

/* Stamp Overlays */
.jhi-stamp {
    position: absolute;
    padding: 8px 18px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 8px;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    z-index: 30;
    transition: opacity 0.1s ease;
}
.jhi-stamp--apply {
    top: 24px;
    left: 24px;
    border: 3px solid #111111;
    color: #111111;
    background: rgba(255, 255, 255, 0.96);
    transform: rotate(-14deg);
}
.jhi-stamp--pass {
    top: 24px;
    right: 24px;
    border: 3px solid #666666;
    color: #666666;
    background: rgba(255, 255, 255, 0.96);
    transform: rotate(14deg);
}
.jhi-stamp--wa {
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #111111;
    color: #ffffff;
    border: 2px solid #111111;
}

/* Card Content Details */
.jhi-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.jhi-card-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}
.jhi-card-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #eeeeee;
    object-fit: contain;
    background: #ffffff;
    padding: 4px;
}
.jhi-card-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #111111;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jhi-card-comp-name {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
}
.jhi-verified-badge {
    font-size: 11px;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 4px;
}
.jhi-match-pill {
    background: #111111;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.jhi-card-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #111111;
    margin-bottom: 16px;
}

/* 4-Stat Specs Grid */
.jhi-card-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
    background: #f7f7f7;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #efefef;
}
.jhi-spec-item {
    display: flex;
    flex-direction: column;
}
.jhi-spec-label {
    font-size: 11px;
    color: #777777;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.jhi-spec-val {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jhi-card-excerpt {
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.jhi-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}
.jhi-tag {
    background: #ffffff;
    border: 1px solid #dddddd;
    color: #333333;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}
.jhi-tag--sm {
    font-size: 10px;
    padding: 2px 6px;
}

.jhi-card-footer-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px dashed #e5e5e5;
    font-size: 12px;
    color: #777777;
    font-weight: 500;
}
.jhi-prompt-arrow {
    font-size: 14px;
    color: #111111;
    font-weight: 700;
}

/* Floating Action Dock (Shaadi.com / Jeevansathi style) */
.jhi-match-action-dock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    width: 100%;
}
.jhi-action-btn {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s, box-shadow 0.2s;
    user-select: none;
}
.jhi-action-btn:hover:not(:disabled) {
    transform: scale(1.12);
}
.jhi-action-btn:active:not(:disabled) {
    transform: scale(0.94);
}
.jhi-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Button Variants */
.jhi-btn-undo {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #d5d5d5;
    color: #666666;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.jhi-btn-undo:hover:not(:disabled) {
    border-color: #111111;
    color: #111111;
}

.jhi-btn-pass {
    width: 62px;
    height: 62px;
    background: #ffffff;
    border: 2px solid #111111;
    color: #111111;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}
.jhi-btn-pass:hover:not(:disabled) {
    background: #f4f4f4;
}

.jhi-btn-info {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #d5d5d5;
    color: #444444;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.jhi-btn-info:hover:not(:disabled) {
    border-color: #111111;
    color: #111111;
}

.jhi-btn-wa {
    width: 52px;
    height: 52px;
    background: #ffffff;
    border: 2px solid #111111;
    color: #111111;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.jhi-btn-wa:hover:not(:disabled) {
    background: #000000;
    color: #ffffff;
}

.jhi-btn-apply {
    width: 62px;
    height: 62px;
    background: #111111;
    border: 2px solid #111111;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.jhi-btn-apply:hover:not(:disabled) {
    background: #252525;
}

.jhi-action-tooltip {
    display: none;
}

/* Skeletons and Empty State */
.jhi-deck-loader {
    width: 100%;
    height: 100%;
    position: relative;
}
.jhi-deck-loader-card {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    padding: 24px;
    box-sizing: border-box;
}
.jhi-skeleton-line {
    background: #eeeeee;
    border-radius: 6px;
    animation: pulse 1.2s infinite ease-in-out;
}
.jhi-skeleton-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}
.jhi-skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.jhi-skeleton-box {
    height: 48px;
    background: #f2f2f2;
    border-radius: 8px;
    animation: pulse 1.2s infinite ease-in-out;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Empty State */
.jhi-deck-empty {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1px dashed #cccccc;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    text-align: center;
    box-sizing: border-box;
}
.jhi-deck-empty-inner {
    max-width: 320px;
    margin: 0 auto;
}
.jhi-deck-empty-icon {
    font-size: 36px;
    color: #111111;
    margin-bottom: 12px;
}
.jhi-deck-empty h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}
.jhi-deck-empty p {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 20px;
}
.jhi-deck-empty-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Drawers */
.jhi-match-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}
.jhi-match-drawer.is-open {
    display: block;
}
.jhi-match-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}
.jhi-match-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
    animation: drawerSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes drawerSlide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.jhi-match-drawer-head {
    padding: 16px 20px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.jhi-drawer-comp-name {
    font-size: 15px;
    font-weight: 700;
}
.jhi-drawer-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #444444;
}
.jhi-match-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}
.jhi-drawer-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}
.jhi-drawer-quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: #f7f7f7;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.jhi-drawer-stat-item span {
    font-size: 11px;
    color: #777777;
    text-transform: uppercase;
}
.jhi-drawer-stat-item strong {
    font-size: 14px;
    font-weight: 700;
    display: block;
    margin-top: 2px;
}

.jhi-drawer-section {
    margin-bottom: 24px;
}
.jhi-drawer-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #111111;
    margin-bottom: 10px;
}
.jhi-drawer-description {
    font-size: 14px;
    line-height: 1.6;
    color: #444444;
}
.jhi-drawer-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.jhi-drawer-sla-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 12px 14px;
}
.jhi-sla-row {
    font-size: 12px;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #eeeeee;
}
.jhi-sla-row:last-child {
    border-bottom: none;
}

.jhi-match-drawer-footer {
    padding: 16px 20px;
    border-top: 1px solid #eeeeee;
    display: flex;
    gap: 12px;
}
.jhi-match-drawer-footer .jhi-button {
    flex: 1;
    justify-content: center;
}

/* Liked List Items */
.jhi-liked-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eeeeee;
}
.jhi-liked-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.jhi-liked-comp {
    font-size: 12px;
    color: #666666;
    display: block;
    margin-bottom: 6px;
}
.jhi-liked-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.jhi-liked-item-actions {
    display: flex;
    gap: 8px;
}
.jhi-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #dddddd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #111111;
    font-size: 14px;
}
.jhi-icon-btn:hover {
    background: #111111;
    color: #ffffff;
}

/* Quick Apply Modal */
.jhi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.jhi-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
}
.jhi-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    z-index: 10;
}
.jhi-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.jhi-modal-head h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.jhi-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
}
.jhi-modal-intro {
    font-size: 13px;
    color: #666666;
    margin-bottom: 16px;
    line-height: 1.4;
}
.jhi-form-group {
    margin-bottom: 14px;
}
.jhi-form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #222222;
}
.jhi-modal-footer {
    margin-top: 20px;
}
.jhi-modal-footer .jhi-button {
    width: 100%;
    justify-content: center;
}
