/* === MODERN OVERRIDES - applies modern style to classic templates === */

/* Reset some classic backgrounds to use modern vars */
.m-profile-wrapper {
    background: var(--m-bg);
    padding: 24px 16px;
    min-height: 70vh;
}

/* Profile detail page */
.m-profile-wrapper .dating-profile-container {
    background: transparent;
    max-width: 1100px; margin: 0 auto;
}

.m-profile-wrapper .dating-profile-header {
    background: var(--m-bg-secondary) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow) !important;
    border: 1px solid var(--m-border);
    overflow: hidden;
    padding: 0 !important;
}

.m-profile-wrapper .dating-profile-photo {
    border-radius: var(--m-radius) 0 0 var(--m-radius) !important;
    aspect-ratio: 1; object-fit: cover;
}

.m-profile-wrapper .dating-profile-info h1 {
    background: var(--m-primary-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    font-size: 36px !important;
}

.m-profile-wrapper .dating-badge-verified,
.m-profile-wrapper .dating-badge-premium {
    background: var(--m-primary-grad) !important;
    border-radius: 100px !important;
    padding: 4px 12px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

.m-profile-wrapper .dating-section {
    background: var(--m-bg-secondary);
    border-radius: var(--m-radius);
    box-shadow: var(--m-shadow);
    border: 1px solid var(--m-border);
    padding: 24px !important;
    margin-bottom: 20px !important;
}

.m-profile-wrapper .dating-section h2,
.m-profile-wrapper .dating-section h3 {
    color: var(--m-text);
    font-weight: 700;
    margin-bottom: 16px !important;
}

.m-profile-wrapper p,
.m-profile-wrapper .dating-meta,
.m-profile-wrapper label,
.m-profile-wrapper td {
    color: var(--m-text) !important;
}

/* Action buttons - more rounded, gradient */
.m-profile-wrapper .btn,
.m-profile-wrapper button[type="submit"] {
    border-radius: 100px !important;
    padding: 10px 24px !important;
    font-weight: 600 !important;
    transition: all 0.2s;
    border: 1.5px solid var(--m-border);
}
.m-profile-wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--m-shadow);
}
.m-profile-wrapper .btn-primary,
.m-profile-wrapper .btn-success {
    background: var(--m-primary-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(255,68,88,0.3);
}
.m-profile-wrapper .btn-secondary,
.m-profile-wrapper .btn-info {
    background: var(--m-secondary-grad) !important;
    border: none !important;
    color: #fff !important;
}
.m-profile-wrapper .btn-danger {
    background: #e74c3c !important;
    border: none !important;
    color: #fff !important;
}

/* Tags styling */
.m-profile-wrapper .dating-tag,
.m-profile-wrapper .dating-interest-tag {
    background: var(--m-secondary-grad) !important;
    color: #fff !important;
    border-radius: 100px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 600;
    margin: 2px;
    display: inline-block;
}

/* Form inputs */
.m-profile-wrapper input[type="text"],
.m-profile-wrapper input[type="email"],
.m-profile-wrapper input[type="number"],
.m-profile-wrapper input[type="date"],
.m-profile-wrapper input[type="url"],
.m-profile-wrapper textarea,
.m-profile-wrapper select {
    background: var(--m-bg) !important;
    border: 1.5px solid var(--m-border) !important;
    border-radius: 10px !important;
    color: var(--m-text) !important;
    padding: 10px 14px !important;
    transition: all 0.2s;
}
.m-profile-wrapper input:focus,
.m-profile-wrapper textarea:focus,
.m-profile-wrapper select:focus {
    border-color: var(--m-primary) !important;
    box-shadow: 0 0 0 3px rgba(255,68,88,0.1) !important;
    outline: none;
}

/* Photo gallery */
.m-profile-wrapper .dating-photo-thumb {
    border-radius: var(--m-radius-sm) !important;
    box-shadow: var(--m-shadow);
    transition: all 0.3s;
}
.m-profile-wrapper .dating-photo-thumb:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: var(--m-shadow-hover);
}

/* Search view */
.m-profile-wrapper .dating-search-advanced {
    background: var(--m-bg-secondary) !important;
    border-radius: var(--m-radius) !important;
    box-shadow: var(--m-shadow);
    border: 1px solid var(--m-border);
    padding: 24px !important;
}

.m-profile-wrapper .dating-search-section h4 {
    color: var(--m-text-muted) !important;
}

/* Profile cards in liked/viewed sections */
.m-profile-wrapper .dating-superlike-card,
.m-profile-wrapper .dating-liked-card,
.m-profile-wrapper .dating-viewed-card {
    border-radius: var(--m-radius-sm) !important;
    overflow: hidden;
    box-shadow: var(--m-shadow);
    transition: all 0.3s;
}
.m-profile-wrapper .dating-superlike-card:hover,
.m-profile-wrapper .dating-liked-card:hover,
.m-profile-wrapper .dating-viewed-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--m-shadow-hover);
}

/* Like counter / stats */
.m-profile-wrapper .dating-like-count,
.m-profile-wrapper .dating-views-count {
    background: var(--m-glass-bg) !important;
    backdrop-filter: blur(10px);
    border-radius: 100px !important;
    padding: 6px 14px !important;
    font-weight: 600;
}

/* Range sliders */
.m-profile-wrapper input[type="range"] {
    accent-color: var(--m-primary);
}

/* Messages page */
.m-profile-wrapper .dating-conversation-list {
    background: transparent !important;
}

.m-profile-wrapper .dating-conversation-item {
    background: var(--m-bg-secondary) !important;
    border-radius: var(--m-radius-sm) !important;
    box-shadow: var(--m-shadow);
    border: 1px solid var(--m-border) !important;
    transition: all 0.2s;
}
.m-profile-wrapper .dating-conversation-item:hover {
    transform: translateX(4px);
    box-shadow: var(--m-shadow-hover);
}

/* Dark mode text fixes */
[data-theme="dark"] .m-profile-wrapper {
    color: var(--m-text);
}
[data-theme="dark"] .m-profile-wrapper * {
    color: inherit;
}
[data-theme="dark"] .m-profile-wrapper a {
    color: var(--m-primary);
}
[data-theme="dark"] .m-profile-wrapper input,
[data-theme="dark"] .m-profile-wrapper textarea,
[data-theme="dark"] .m-profile-wrapper select {
    background: var(--m-bg) !important;
    color: var(--m-text) !important;
}

/* Gallery view */
.m-profile-wrapper .dating-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.m-profile-wrapper .dating-gallery-photo {
    border-radius: var(--m-radius-sm) !important;
    box-shadow: var(--m-shadow);
    transition: all 0.3s;
    aspect-ratio: 1;
    object-fit: cover;
}
.m-profile-wrapper .dating-gallery-photo:hover {
    transform: scale(1.03);
    box-shadow: var(--m-shadow-hover);
}

/* Profile photo - hero style */
.m-profile-wrapper .dating-profile-photo-wrap {
    position: relative;
    border-radius: var(--m-radius) !important;
    overflow: hidden;
    box-shadow: var(--m-shadow-hover);
}

/* Field labels */
.m-profile-wrapper .dating-field-label,
.m-profile-wrapper .dating-edit-form label {
    color: var(--m-text-muted) !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
}

/* Filter form in search */
.m-profile-wrapper .dating-search-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
}

/* Pagination */
.m-profile-wrapper .pagination,
.m-profile-wrapper [class*="dating-pag"] {
    gap: 8px;
}
.m-profile-wrapper .pagination a,
.m-profile-wrapper [class*="dating-pag"] a {
    border-radius: 10px !important;
    background: var(--m-bg-secondary) !important;
    border: 1px solid var(--m-border) !important;
    color: var(--m-text) !important;
}
.m-profile-wrapper .pagination a.active,
.m-profile-wrapper [class*="dating-pag"] a.active {
    background: var(--m-primary-grad) !important;
    color: #fff !important;
    border: none !important;
}

/* Empty states */
.m-profile-wrapper .dating-empty,
.m-profile-wrapper .dating-no-results {
    background: var(--m-bg-secondary);
    border-radius: var(--m-radius);
    padding: 60px 20px;
    color: var(--m-text-muted);
}

/* Smooth transitions everywhere */
.m-profile-wrapper * {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}


/* Profile action buttons - add spacing from edges and between buttons */
.m-profile-wrapper .dating-profile-actions,
.m-profile-wrapper .dating-actions {
    padding: 16px 20px !important;
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
.m-profile-wrapper .dating-profile-actions .btn,
.m-profile-wrapper .dating-actions .btn {
    margin: 0 !important;
}

/* Profile info section spacing */
.m-profile-wrapper .dating-profile-info {
    padding: 24px !important;
}

/* Search advanced grid - apply modern card style to result cards */
.m-profile-wrapper .dating-search-results,
.m-profile-wrapper .dating-results-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 24px !important;
}
.m-profile-wrapper .dating-result-card,
.m-profile-wrapper .dating-card {
    background: var(--m-bg-secondary) !important;
    border-radius: var(--m-radius) !important;
    overflow: hidden !important;
    box-shadow: var(--m-shadow) !important;
    border: 1px solid var(--m-border) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}
.m-profile-wrapper .dating-result-card:hover,
.m-profile-wrapper .dating-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: var(--m-shadow-hover) !important;
}
.m-profile-wrapper .dating-result-photo,
.m-profile-wrapper .dating-card img {
    aspect-ratio: 3/4 !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Profile blur (non-premium) - apply in modern too */
.m-profile-wrapper .dating-card img.blurred,
.m-profile-wrapper .dating-result-photo.blurred,
.m-profile-wrapper img[data-blur="1"] {
    filter: blur(20px);
}


/* It's a Match badge - add margin from edges */
.m-profile-wrapper .dating-profile-info > div[style*="border-radius:20px"] {
    margin-top: 20px !important;
    margin-left: 4px !important;
}

/* Profile header layout improvements */
.m-profile-wrapper .dating-profile-header {
    display: flex !important;
    gap: 24px !important;
    align-items: stretch !important;
    padding: 24px !important;
}
.m-profile-wrapper .dating-profile-photo {
    flex-shrink: 0 !important;
    width: 240px !important;
    max-width: 40% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-profile-wrapper .dating-profile-photo img {
    width: 220px !important;
    height: 220px !important;
    aspect-ratio: 1 !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    box-shadow: var(--m-shadow-hover);
    border: 4px solid var(--m-bg-secondary);
    cursor: pointer;
    transition: transform 0.3s;
}
.m-profile-wrapper .dating-profile-photo img:hover {
    transform: scale(1.04);
}
.m-profile-wrapper .dating-profile-info {
    flex: 1 !important;
    padding: 12px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

@media (max-width: 768px) {
    .m-profile-wrapper .dating-profile-header { flex-direction: column !important; }
    .m-profile-wrapper .dating-profile-photo { width: 100% !important; max-width: 100% !important; }
}

/* Drag-drop zone styling */
.m-dropzone {
    border: 2px dashed var(--m-border);
    border-radius: var(--m-radius);
    padding: 40px 20px;
    text-align: center;
    background: var(--m-bg-secondary);
    color: var(--m-text-muted);
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 20px;
}
.m-dropzone:hover, .m-dropzone.active {
    border-color: var(--m-primary);
    background: rgba(255, 68, 88, 0.05);
    color: var(--m-primary);
}
.m-dropzone-icon { font-size: 48px; margin-bottom: 12px; }
.m-dropzone-text { font-size: 14px; font-weight: 600; }
.m-dropzone-hint { font-size: 12px; margin-top: 4px; opacity: 0.7; }
.m-dropzone input[type="file"] { display: none; }

.m-upload-progress {
    width: 100%; height: 6px; background: var(--m-border);
    border-radius: 3px; overflow: hidden; margin-top: 12px; display: none;
}
.m-upload-progress.active { display: block; }
.m-upload-progress-bar {
    height: 100%; background: var(--m-primary-grad);
    transition: width 0.3s;
}
