/* =================================
   WPMatch Dating Theme Styles
   ================================= */

/* Dating-specific utility classes */
.wpmatch-active .wpmatch-profile-card {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    padding: var(--wp--preset--spacing--50);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wpmatch-active .wpmatch-profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.15);
}

/* Dating page layouts */
.wpmatch-page {
    background-color: var(--wp--preset--color--off-white);
}

.wpmatch-page .wp-site-blocks {
    padding-top: 0;
}

/* Profile card grid */
.wpmatch-profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--wp--preset--spacing--50);
    margin: var(--wp--preset--spacing--60) 0;
}

.wpmatch-profile-card .profile-image {
    aspect-ratio: 3/4;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: var(--wp--preset--spacing--30);
}

.wpmatch-profile-card .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpmatch-profile-card .profile-info {
    text-align: center;
}

.wpmatch-profile-card .profile-name {
    font-size: var(--wp--preset--font-size--large);
    font-weight: 600;
    color: var(--wp--preset--color--dark);
    margin-bottom: var(--wp--preset--spacing--20);
}

.wpmatch-profile-card .profile-details {
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--medium-gray);
    margin-bottom: var(--wp--preset--spacing--30);
}

.wpmatch-profile-card .profile-actions {
    display: flex;
    gap: var(--wp--preset--spacing--20);
    justify-content: center;
}

/* Search filters */
.wpmatch-search-filters {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    padding: var(--wp--preset--spacing--50);
    margin-bottom: var(--wp--preset--spacing--60);
}

.wpmatch-search-filters .filter-row {
    display: flex;
    gap: var(--wp--preset--spacing--40);
    align-items: end;
    margin-bottom: var(--wp--preset--spacing--30);
    flex-wrap: wrap;
}

.wpmatch-search-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--10);
    min-width: 120px;
}

.wpmatch-search-filters label {
    font-size: var(--wp--preset--font-size--small);
    font-weight: 500;
    color: var(--wp--preset--color--dark);
}

.wpmatch-search-filters select,
.wpmatch-search-filters input[type="text"],
.wpmatch-search-filters input[type="number"] {
    padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 6px;
    font-size: var(--wp--preset--font-size--small);
}

.wpmatch-search-filters input[type="checkbox"] {
    margin-right: var(--wp--preset--spacing--10);
}

/* Messages interface */
.wpmatch-messages {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--wp--preset--spacing--50);
    height: 70vh;
}

.wpmatch-messages .conversations-list {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    padding: var(--wp--preset--spacing--40);
    overflow-y: auto;
}

.wpmatch-messages .conversation-item {
    display: flex;
    align-items: center;
    gap: var(--wp--preset--spacing--30);
    padding: var(--wp--preset--spacing--30);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wpmatch-messages .conversation-item:hover {
    background-color: var(--wp--preset--color--off-white);
}

.wpmatch-messages .conversation-item.active {
    background-color: var(--wp--preset--color--primary-light);
}

.wpmatch-messages .conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.wpmatch-messages .conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpmatch-messages .conversation-info {
    flex: 1;
}

.wpmatch-messages .conversation-name {
    font-weight: 600;
    color: var(--wp--preset--color--dark);
    font-size: var(--wp--preset--font-size--small);
}

.wpmatch-messages .conversation-preview {
    color: var(--wp--preset--color--medium-gray);
    font-size: 12px;
    margin-top: var(--wp--preset--spacing--10);
}

.wpmatch-messages .message-thread {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.wpmatch-messages .thread-header {
    padding: var(--wp--preset--spacing--40);
    border-bottom: 1px solid var(--wp--preset--color--light-gray);
}

.wpmatch-messages .thread-messages {
    flex: 1;
    padding: var(--wp--preset--spacing--40);
    overflow-y: auto;
}

.wpmatch-messages .message-compose {
    padding: var(--wp--preset--spacing--40);
    border-top: 1px solid var(--wp--preset--color--light-gray);
}

.wpmatch-messages .message-compose form {
    display: flex;
    gap: var(--wp--preset--spacing--30);
}

.wpmatch-messages .message-compose textarea {
    flex: 1;
    padding: var(--wp--preset--spacing--30);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 6px;
    resize: none;
    height: 60px;
}

/* Registration form */
.wpmatch-registration-form {
    max-width: 500px;
    margin: 0 auto;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    padding: var(--wp--preset--spacing--60);
}

.wpmatch-form .form-group {
    margin-bottom: var(--wp--preset--spacing--40);
}

.wpmatch-form label {
    display: block;
    margin-bottom: var(--wp--preset--spacing--20);
    font-weight: 500;
    color: var(--wp--preset--color--dark);
}

.wpmatch-form input[type="text"],
.wpmatch-form input[type="email"],
.wpmatch-form input[type="password"],
.wpmatch-form input[type="number"],
.wpmatch-form select,
.wpmatch-form textarea {
    width: 100%;
    padding: var(--wp--preset--spacing--30);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 6px;
    font-size: var(--wp--preset--font-size--medium);
}

.wpmatch-form input:focus,
.wpmatch-form select:focus,
.wpmatch-form textarea:focus {
    outline: none;
    border-color: var(--wp--preset--color--primary);
    box-shadow: 0 0 0 2px rgba(233, 30, 99, 0.1);
}

/* Success stories */
.wpmatch-success-stories.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--wp--preset--spacing--50);
}

.wpmatch-success-stories .success-story {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wpmatch-success-stories .success-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.wpmatch-success-stories .story-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.wpmatch-success-stories .story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpmatch-success-stories .story-content {
    padding: var(--wp--preset--spacing--40);
}

.wpmatch-success-stories .story-content h3 {
    font-size: var(--wp--preset--font-size--large);
    font-weight: 600;
    color: var(--wp--preset--color--dark);
    margin-bottom: var(--wp--preset--spacing--20);
}

.wpmatch-success-stories .story-excerpt {
    color: var(--wp--preset--color--medium-gray);
    margin-bottom: var(--wp--preset--spacing--30);
    line-height: 1.6;
}

.wpmatch-success-stories .read-more {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--wp--preset--font-size--small);
}

.wpmatch-success-stories .read-more:hover {
    color: var(--wp--preset--color--primary-dark);
}

/* Button styles */
.is-style-dating-primary .wp-block-button__link {
    background: linear-gradient(135deg, var(--wp--preset--color--primary) 0%, var(--wp--preset--color--secondary) 100%);
    border: none;
    border-radius: 8px;
    padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--60);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-style-dating-primary .wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
}

.is-style-dating-outline .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary);
    border-radius: 8px;
    padding: calc(var(--wp--preset--spacing--30) - 2px) calc(var(--wp--preset--spacing--60) - 2px);
    font-weight: 600;
    transition: all 0.2s ease;
}

.is-style-dating-outline .wp-block-button__link:hover {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--white);
}

/* Cover block styles */
.is-style-hero-banner.wp-block-cover {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.is-style-hero-banner .wp-block-cover__inner-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Group block styles */
.is-style-profile-card.wp-block-group {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-gray);
    border-radius: 12px;
    padding: var(--wp--preset--spacing--50);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-style-profile-card.wp-block-group:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(233, 30, 99, 0.15);
}

.is-style-dating-section.wp-block-group {
    background: var(--wp--preset--color--white);
    border-radius: 12px;
    padding: var(--wp--preset--spacing--70);
    margin: var(--wp--preset--spacing--60) 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .wpmatch-messages {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .wpmatch-messages .conversations-list {
        height: 200px;
    }
    
    .wpmatch-messages .message-thread {
        height: 400px;
    }
    
    .wpmatch-search-filters .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wpmatch-profiles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: var(--wp--preset--spacing--40);
    }
    
    .wpmatch-registration-form {
        margin: var(--wp--preset--spacing--40);
        padding: var(--wp--preset--spacing--50);
    }
}

@media (max-width: 480px) {
    .wpmatch-profiles-grid {
        grid-template-columns: 1fr;
    }
    
    .wpmatch-profile-card .profile-actions {
        flex-direction: column;
    }
    
    .is-style-hero-banner .wp-block-cover__inner-container {
        padding: var(--wp--preset--spacing--40);
    }
}

/* Loading states */
.wpmatch-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--wp--preset--spacing--80);
    color: var(--wp--preset--color--medium-gray);
}

.wpmatch-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--wp--preset--color--light-gray);
    border-top: 2px solid var(--wp--preset--color--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: var(--wp--preset--spacing--20);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility improvements */
.wpmatch-profile-card:focus-within {
    outline: 2px solid var(--wp--preset--color--primary);
    outline-offset: 2px;
}

.wpmatch-messages .conversation-item:focus {
    outline: 2px solid var(--wp--preset--color--primary);
    outline-offset: -2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wpmatch-page {
        background-color: var(--wp--preset--color--dark);
    }
    
    .wpmatch-profile-card,
    .wpmatch-search-filters,
    .wpmatch-registration-form,
    .wpmatch-success-stories .success-story {
        background: var(--wp--preset--color--dark-gray);
        border-color: var(--wp--preset--color--medium-gray);
    }
}