/**
 * RentConnect Landlord Profile Stylesheet
 * Consumes Core's rentconnect-design-system design tokens:
 * --rc-primary, --rc-secondary, --rc-accent, --rc-surface, --rc-background,
 * --rc-text-main, --rc-text-muted, --rc-border, --rc-border-hover,
 * --rc-radius, --rc-radius-sm, --rc-radius-lg, --rc-font-body, --rc-font-heading,
 * --rc-shadow-sm, --rc-shadow-md, --rc-shadow-lg.
 * No :root redeclaration.
 */

/* Container & Cards */
.rc-landlord-apply-container {
    max-width: 680px;
    margin: 0 auto;
    background: var(--rc-surface, #ffffff);
    border: 1px solid var(--rc-border, #e2e8f0);
    border-radius: var(--rc-radius-lg, 12px);
    padding: 32px;
    box-shadow: var(--rc-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
    font-family: var(--rc-font-body, inherit);
}

.rc-apply-header {
    text-align: center;
    margin-bottom: 28px;
}

.rc-apply-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--rc-radius-lg, 12px);
    background: var(--rc-background, #f8fafc);
    color: var(--rc-primary, #2563eb);
    margin-bottom: 12px;
    border: 1px solid var(--rc-border, #e2e8f0);
}

.rc-apply-title {
    font-family: var(--rc-font-heading, inherit);
    font-size: 22px;
    font-weight: 700;
    color: var(--rc-text-main, #0f172a);
    margin: 0 0 8px 0;
}

.rc-apply-subtitle {
    font-size: 14px;
    color: var(--rc-text-muted, #64748b);
    line-height: 1.5;
    margin: 0;
}

/* Form Styles */
.rc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .rc-form-grid {
        grid-template-columns: 1fr;
    }
}

.rc-full-width {
    grid-column: 1 / -1;
}

.rc-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rc-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--rc-text-main, #1e293b);
}

.rc-required {
    color: var(--rc-accent, #ef4444);
    margin-left: 2px;
}

.rc-field-hint {
    font-size: 11.5px;
    color: var(--rc-text-muted, #64748b);
    line-height: 1.4;
}

.rc-input,
.rc-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--rc-border, #cbd5e1);
    border-radius: var(--rc-radius, 8px);
    background: var(--rc-surface, #ffffff);
    color: var(--rc-text-main, #0f172a);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    font-family: var(--rc-font-body, inherit);
}

.rc-input:focus,
.rc-textarea:focus {
    outline: none;
    border-color: var(--rc-primary, #2563eb);
    box-shadow: 0 0 0 3px var(--rc-border-hover, rgba(37, 99, 235, 0.15));
}

/* Buttons */
.rc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--rc-radius, 8px);
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-family: var(--rc-font-body, inherit);
}

.rc-btn-primary {
    background: var(--rc-primary, #2563eb);
    color: #ffffff;
    width: 100%;
}

.rc-btn-primary:hover {
    background: var(--rc-secondary, #1d4ed8);
}

.rc-btn-whatsapp {
    background: #25d366;
    color: #ffffff;
}

.rc-btn-whatsapp:hover {
    background: #1eb954;
    color: #ffffff;
}

.rc-privacy-note {
    font-size: 11.5px;
    color: var(--rc-text-muted, #64748b);
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

/* Spinner Animation */
.rc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: rc-spin 0.8s linear infinite;
}

.rc-reviews-loading .rc-spinner {
    width: 24px;
    height: 24px;
    border-color: var(--rc-border, #e2e8f0);
    border-top-color: var(--rc-primary, #2563eb);
    margin-bottom: 8px;
}

@keyframes rc-spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.rc-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--rc-radius, 8px);
    margin-bottom: 20px;
    font-size: 13.5px;
    line-height: 1.5;
}

.rc-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.rc-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--rc-accent, #b91c1c);
}

/* Status Badges */
.rc-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.rc-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.rc-badge-approved {
    background: #dcfce7;
    color: #166534;
}

.rc-badge-rejected {
    background: #fee2e2;
    color: var(--rc-accent, #991b1b);
}

/* Landlord Public Profile Page */
.rc-landlord-profile-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: var(--rc-font-body, inherit);
}

.rc-card {
    background: var(--rc-surface, #ffffff);
    border: 1px solid var(--rc-border, #e2e8f0);
    border-radius: var(--rc-radius-lg, 12px);
    padding: 28px;
    box-shadow: var(--rc-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.05));
}

.rc-landlord-hero {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

@media (max-width: 768px) {
    .rc-landlord-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.rc-landlord-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.rc-landlord-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rc-surface, #ffffff);
    box-shadow: var(--rc-shadow-md, 0 4px 14px rgba(0,0,0,0.08));
}

.rc-verified-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: var(--rc-primary, #2563eb);
    color: #ffffff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--rc-surface, #ffffff);
}

.rc-landlord-info {
    flex: 1;
}

.rc-landlord-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.rc-landlord-name {
    font-family: var(--rc-font-heading, inherit);
    font-size: 26px;
    font-weight: 700;
    color: var(--rc-text-main, #0f172a);
    margin: 0;
}

.rc-badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--rc-background, #eff6ff);
    color: var(--rc-primary, #1d4ed8);
    border: 1px solid var(--rc-border, #bfdbfe);
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.rc-landlord-meta-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--rc-text-muted, #64748b);
    margin-bottom: 14px;
}

.rc-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rc-landlord-bio {
    font-size: 14.5px;
    color: var(--rc-text-main, #334155);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Listings Grid */
.rc-landlord-section {
    margin-top: 36px;
}

.rc-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.rc-section-title {
    font-family: var(--rc-font-heading, inherit);
    font-size: 20px;
    font-weight: 700;
    color: var(--rc-text-main, #0f172a);
    margin: 0;
}

.rc-section-count {
    font-size: 13px;
    color: var(--rc-text-muted, #64748b);
}

.rc-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Reusing rc-listing-card markup/classes */
.rc-listing-card {
    background: var(--rc-surface, #ffffff);
    border: 1px solid var(--rc-border, #e2e8f0);
    border-radius: var(--rc-radius, 10px);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: var(--rc-shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.rc-listing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--rc-shadow-md, 0 8px 20px rgba(0, 0, 0, 0.06));
    border-color: var(--rc-border-hover, #cbd5e1);
}

.rc-listing-media {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.rc-listing-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.rc-listing-card:hover .rc-listing-img {
    transform: scale(1.03);
}

.rc-listing-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--rc-radius-sm, 6px);
}

.rc-listing-content {
    padding: 16px;
}

.rc-listing-price-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 6px;
}

.rc-listing-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--rc-primary, #2563eb);
}

.rc-listing-period {
    font-size: 12px;
    color: var(--rc-text-muted, #64748b);
}

.rc-listing-title {
    font-family: var(--rc-font-heading, inherit);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.rc-listing-title a {
    color: var(--rc-text-main, #0f172a);
    text-decoration: none;
}

.rc-listing-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--rc-text-muted, #64748b);
    margin: 0 0 10px 0;
}

.rc-listing-specs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--rc-text-muted, #64748b);
    padding-top: 8px;
    border-top: 1px solid var(--rc-border, #f1f5f9);
}

/* Reviews Feed */
.rc-reviews-container {
    background: var(--rc-surface, #ffffff);
    border: 1px solid var(--rc-border, #e2e8f0);
    border-radius: var(--rc-radius-lg, 12px);
    padding: 24px;
}

.rc-reviews-loading,
.rc-reviews-empty,
.rc-reviews-error {
    text-align: center;
    padding: 32px 16px;
    color: var(--rc-text-muted, #64748b);
    font-size: 14px;
}

.rc-reviews-summary-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rc-border, #e2e8f0);
}

.rc-reviews-avg {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rc-avg-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--rc-text-main, #0f172a);
}

.rc-stars-display {
    display: inline-flex;
    gap: 2px;
    color: #eab308;
}

.rc-reviews-total {
    font-size: 13px;
    color: var(--rc-text-muted, #64748b);
}

.rc-reviews-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rc-review-card {
    padding: 16px;
    background: var(--rc-background, #f8fafc);
    border: 1px solid var(--rc-border, #e2e8f0);
    border-radius: var(--rc-radius, 8px);
}

.rc-review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.rc-review-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rc-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.rc-review-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rc-border, #cbd5e1);
    color: var(--rc-text-main, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.rc-review-author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--rc-text-main, #0f172a);
}

.rc-verified-tenant-badge {
    display: inline-block;
    font-size: 11px;
    color: #16a34a;
    font-weight: 500;
}

.rc-review-stars {
    color: #eab308;
}

.rc-review-comment {
    font-size: 13.5px;
    color: var(--rc-text-main, #334155);
    line-height: 1.5;
}

.rc-review-date {
    font-size: 11.5px;
    color: var(--rc-text-muted, #64748b);
    margin-top: 8px;
}
