/*************************************************************
  Yanadi Matrimony Plugin Styles
  Fully updated with Instagram/Facebook style real-time chat UI
*************************************************************/

/*************************************************************
  1. GLOBAL RESET / BASE
**************************************************************/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td, article, aside,
canvas, details, embed, figure, figcaption, footer,
header, hgroup, menu, nav, output, ruby, section,
summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
    box-sizing: border-box;
}
html {
    line-height: 1.2;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

/*************************************************************
  2. UTILITY CLASSES & BASIC ELEMENTS
**************************************************************/
.tm-btn,
.tm-btn-primary,
.tm-btn-link {
    cursor: pointer;
    text-decoration: none;
}

.tm-btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #0073aa;
    color: #fff;
    border-radius: 4px;
    border: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}
.tm-btn:hover {
    background: #005177;
}

.tm-btn-primary {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #28a745;
    color: #fff;
    border-radius: 4px;
    border: none;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}
.tm-btn-primary:hover {
    background: #218838;
}

.tm-btn-link {
    color: #0073aa;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.tm-btn-link:hover {
    color: #005177;
    text-decoration: underline;
}

/* Alerts */
.tm-alert {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.95rem;
}
.tm-alert.tm-alert-success {
    background-color: #d4edda;
    color: #155724;
}
.tm-alert.tm-alert-error {
    background-color: #f8d7da;
    color: #721c24;
}
.tm-alert.tm-alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/*************************************************************
  3. FORM CONTAINERS (Register, Login, Profile Edit, etc.)
**************************************************************/
.tm-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 24px;
    max-width: 600px;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.tm-form-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}
.tm-form-group {
    margin-bottom: 15px;
}
.tm-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.tm-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}
.tm-form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 3px rgba(0,115,170,0.2);
}

/*************************************************************
  4. LOGIN CONTAINER (2-column layout)
**************************************************************/
.tm-login-container {
    display: flex;
    min-height: 80vh;
    background: #f0f2f5;
}
.tm-login-left {
    flex: 1;
    padding: 2rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.tm-login-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
}
.tm-login-illustration {
    max-width: 250px;
    margin-bottom: 1rem;
}

/*************************************************************
  5. DASHBOARD CONTAINER
**************************************************************/
.tm-dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/*************************************************************
  6. HERO SECTION (For Dashboard)
**************************************************************/
.tm-hero {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.tm-hero-content {
    backdrop-filter: blur(6px);
    background: rgba(0,0,0,0.3);
    padding: 1rem 2rem;
    border-radius: 4px;
}

/*************************************************************
  7. STATS CARDS (Top Summary)
**************************************************************/
.tm-stats-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}
.tm-stats-card {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-width: 120px;
    transition: transform 0.2s ease;
}
.tm-stats-card:hover {
    transform: translateY(-3px);
}
.tm-stats-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 0.3rem;
}
.tm-stats-label {
    font-size: 0.85rem;
    color: #666;
}

/*************************************************************
  8. CAROUSEL (Recommended Matches)
**************************************************************/
.tm-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem;
    scroll-behavior: smooth;
}
.tm-carousel::-webkit-scrollbar {
    height: 8px;
}
.tm-carousel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/*************************************************************
  9. CARD LAYOUTS
**************************************************************/
.tm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
.tm-card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}
.tm-card:hover {
    transform: translateY(-2px);
}
.tm-card-img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.tm-card-content {
    margin-top: 0.5rem;
}
.tm-card-actions a {
    margin-right: 1rem;
    font-size: 0.85rem;
}

/*************************************************************
  10. REQUESTS / CONNECTIONS / SHORTLIST
**************************************************************/
.tm-request-card,
.tm-connection-card,
.tm-shortlist-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.tm-request-card .tm-card-img,
.tm-connection-card .tm-card-img,
.tm-shortlist-card .tm-card-img {
    max-width: 80px;
    border-radius: 4px;
}

/*************************************************************
  11. SECTIONS, HEADINGS
**************************************************************/
.tm-section {
    margin-bottom: 2rem;
}
.tm-section-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
    border-left: 4px solid #0073aa;
    padding-left: 0.5rem;
}

/*************************************************************
  12. ADVANCED SEARCH FORM
**************************************************************/
.tm-advanced-search-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}
.tm-advanced-search-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.tm-advanced-search-form label {
    font-weight: 600;
    margin-right: 0.25rem;
    font-size: 0.9rem;
}
.tm-advanced-search-form select,
.tm-advanced-search-form input[type="text"] {
    padding: 0.4rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/*************************************************************
  13. TAB INTERFACE, MULTI-STEP WIZARD, RESPONSIVE
**************************************************************/
/* ... (existing styles omitted for brevity) ... */

@media (max-width: 768px) {
    .tm-stats-cards { flex-direction: column; }
    .tm-card-grid { grid-template-columns: 1fr; }
    .tm-request-card,
    .tm-connection-card,
    .tm-shortlist-card { flex-direction: column; }
    .tm-tab-nav { flex-wrap: wrap; }
    .tm-login-container { flex-direction: column; }
    .tm-login-left,
    .tm-login-right {
        flex: none;
        width: 100%;
        padding: 1.5rem;
    }
}

/*************************************************************
  14. REAL-TIME CHAT UI (Instagram/Facebook style)
**************************************************************/
#ym-chat-box {
    border: 1px solid #ccc;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    background-color: #fafafa;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Other user messages */
.chat-them {
    justify-content: flex-start;
    flex-direction: row;
}

/* Current user messages */
.chat-me {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

/* Avatar */
.chat-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.chat-them .chat-avatar { margin-right: 0.5rem; }
.chat-me   .chat-avatar { margin-left: 0.5rem; }

/* Message content */
.chat-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
}
.chat-them .chat-content { text-align: left; }
.chat-me   .chat-content { text-align: right; }

/* Display name */
.chat-name {
    font-size: 0.75rem;
    color: #555;
    margin-bottom: 0.25rem;
}

/* Bubble */
.chat-bubble {
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.3;
}
.chat-them .chat-bubble {
    background: #ececec;
    color: #333;
    border-bottom-left-radius: 4px;
}
.chat-me .chat-bubble {
    background: var(--ym-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Timestamp */
.chat-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 0.25rem;
    align-self: flex-end;
}

/* Typing indicator */
#ym-typing-indicator {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Bell icon & badge */
#ym-chat-header .bell-icon {
  font-size: 1.5rem;
}
.bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: #fff;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Cursor pointer on bell */
#ym-chat-bell:hover .bell-icon {
  color: var(--ym-primary);
}

