/**
 * Veneprop Plugin Styles
 * 
 * Main stylesheet for Veneprop plugin
 * Focus on functionality, not heavy design
 */

/* ===== GENERAL ===== */
.veneprop-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    line-height: 1.5;
}

.veneprop-btn:hover {
    background: #f5f5f5;
}

.veneprop-btn-primary {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.veneprop-btn-primary:hover {
    background: #005177;
    border-color: #005177;
}

.veneprop-btn-outline {
    background: transparent;
    border-color: #0073aa;
    color: #0073aa;
}

.veneprop-btn-outline:hover {
    background: #0073aa;
    color: #fff;
}

.veneprop-btn-danger {
    background: #dc3232;
    color: #fff;
    border-color: #dc3232;
}

.veneprop-btn-danger:hover {
    background: #a00;
}

/* ===== SEARCH FORM ===== */
.veneprop-search-form {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 30px;
}

.veneprop-search-form .search-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.veneprop-search-form .search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.veneprop-search-form .search-field input,
.veneprop-search-form .search-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
}

.veneprop-search-form .search-submit {
    display: flex;
    align-items: flex-end;
}

.veneprop-search-form .search-submit button {
    width: 100%;
}

/* ===== PROPERTIES GRID ===== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.property-card {
    border: 1px solid #e0e0e0;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.property-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.property-card .property-image {
    position: relative;
    padding-top: 66.67%;
    overflow: hidden;
}

.property-card .property-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-card .property-badges {
    position: absolute;
    top: 10px;
    left: 10px;
}

.property-card .property-badge {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

.property-card .property-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
}

.property-card .property-content {
    padding: 20px;
}

.property-card .property-price {
    font-size: 24px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 10px;
}

.property-card .property-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.property-card .property-title a {
    color: #333;
    text-decoration: none;
}

.property-card .property-title a:hover {
    color: #0073aa;
}

.property-card .property-location {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.property-card .property-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.property-card .property-features {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.property-card .property-features .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.property-card .property-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.property-card .property-footer {
    margin-top: 15px;
}

/* ===== FAVORITE BUTTON ===== */
.veneprop-favorite-btn {
    background: rgba(255,255,255,0.9);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.veneprop-favorite-btn:hover {
    background: #fff;
}

.veneprop-favorite-btn.is-favorite .dashicons {
    color: #dc3232;
}

.veneprop-favorite-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.veneprop-favorite-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== PROPERTY DETAIL ===== */
.veneprop-property-detail {
    max-width: 1200px;
    margin: 0 auto;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.property-title-section h1 {
    margin: 0 0 10px;
}

.property-meta-info {
    display: flex;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.property-price-section {
    text-align: right;
}

.property-price-section .property-price {
    font-size: 32px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 10px;
}

.property-gallery {
    margin-bottom: 30px;
}

.property-gallery .gallery-main img {
    width: 100%;
    height: auto;
}

.property-gallery .gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    overflow-x: auto;
}

.property-gallery .gallery-thumbnails img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.property-gallery .gallery-thumbnails img:hover,
.property-gallery .gallery-thumbnails img.active {
    opacity: 1;
}

.property-main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.property-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.property-section h2,
.property-section h3 {
    margin-top: 0;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.property-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.property-features-grid .feature-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #f9f9f9;
    text-align: center;
}

.property-features-grid .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    margin: 0 auto;
    color: #0073aa;
}

.property-features-grid .feature-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.property-features-grid .feature-value {
    font-size: 18px;
    font-weight: 700;
}

.property-amenities {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.property-amenities li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-amenities .dashicons {
    color: #0073aa;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ===== FORMS ===== */
.veneprop-form {
    max-width: 600px;
}

.veneprop-form .form-messages {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: none;
}

.veneprop-form .form-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.veneprop-form .form-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.veneprop-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.veneprop-form .form-field {
    margin-bottom: 20px;
}

.veneprop-form .form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

.veneprop-form .form-field input[type="text"],
.veneprop-form .form-field input[type="email"],
.veneprop-form .form-field input[type="password"],
.veneprop-form .form-field input[type="number"],
.veneprop-form .form-field input[type="url"],
.veneprop-form .form-field select,
.veneprop-form .form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.veneprop-form .form-field .required {
    color: #dc3232;
}

.veneprop-form .form-field .description {
    display: block;
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.veneprop-form .checkbox-field label {
    font-weight: normal;
}

.veneprop-form .form-footer {
    text-align: center;
    margin-top: 20px;
}

/* ===== DASHBOARD ===== */
.veneprop-dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    min-height: 500px;
}

.dashboard-nav {
    background: #f9f9f9;
    padding: 20px 0;
    border: 1px solid #e0e0e0;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    background: #fff;
    border-left-color: #0073aa;
    color: #0073aa;
}

.dashboard-nav .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.dashboard-nav .badge {
    background: #dc3232;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: auto;
}

.dashboard-nav .logout-link {
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
    padding-top: 20px;
}

.dashboard-content {
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0073aa;
}

.dashboard-header h2 {
    margin: 0;
}

/* ===== PROPERTIES TABLE ===== */
.properties-table {
    overflow-x: auto;
}

.properties-table table {
    width: 100%;
    border-collapse: collapse;
}

.properties-table th,
.properties-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.properties-table th {
    background: #f9f9f9;
    font-weight: 600;
}

.properties-table .property-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.properties-table .no-thumbnail {
    width: 60px;
    height: 60px;
    background: #e0e0e0;
}

.properties-table .status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.properties-table .status-published {
    background: #d4edda;
    color: #155724;
}

.properties-table .status-draft {
    background: #fff3cd;
    color: #856404;
}

.properties-table .action-btn {
    display: inline-block;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
    color: #0073aa;
}

.properties-table .action-btn:hover {
    color: #005177;
}

.properties-table .action-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ===== PROPERTY FORM ===== */
.property-form {
    max-width: 100%;
}

.property-form .form-section {
    background: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.property-form .form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.property-form .checkbox-label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

.property-form .image-upload-container,
.property-form .gallery-upload-container {
    margin-top: 10px;
}

.property-form #featured-image-preview img {
    max-width: 300px;
    height: auto;
    margin-bottom: 10px;
}

.property-form #gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.property-form .gallery-image {
    position: relative;
    width: 100px;
    height: 100px;
}

.property-form .gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-form .remove-gallery-image {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

.property-form .form-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* ===== LEADS ===== */
.leads-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 20px;
}

.lead-card.unread {
    border-left: 4px solid #0073aa;
    background: #f0f8ff;
}

.lead-card .lead-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.lead-card .new-badge {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
}

.lead-card .lead-date {
    color: #666;
    font-size: 13px;
}

.lead-card .lead-content {
    margin-bottom: 15px;
}

.lead-card .lead-info p,
.lead-card .lead-message p {
    margin: 5px 0;
    font-size: 14px;
}

.lead-card .lead-message {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.lead-card .lead-actions {
    display: flex;
    gap: 10px;
}

/* ===== NO RESULTS ===== */
.no-properties-found,
.no-properties,
.no-favorites,
.no-leads {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
}

/* ===== PAGINATION ===== */
.veneprop-pagination {
    margin-top: 30px;
    text-align: center;
}

.veneprop-pagination a,
.veneprop-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #333;
}

.veneprop-pagination a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.veneprop-pagination .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .veneprop-dashboard {
        grid-template-columns: 1fr;
    }
    
    .dashboard-nav {
        display: flex;
        overflow-x: auto;
        padding: 0;
    }
    
    .dashboard-nav a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .dashboard-nav a:hover,
    .dashboard-nav a.active {
        border-left: none;
        border-bottom-color: #0073aa;
    }
    
    .property-main-content {
        grid-template-columns: 1fr;
    }
    
    .property-header {
        flex-direction: column;
    }
    
    .property-price-section {
        text-align: left;
    }
    
    .veneprop-search-form .search-row {
        grid-template-columns: 1fr;
    }
}

/* ===== AI ASSISTANT BOX ===== */
.veneprop-ai-assistant-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.veneprop-ai-assistant-box h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 22px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 12px;
}

.veneprop-ai-assistant-box > p {
    margin: 0 0 20px 0;
    opacity: 0.95;
    font-size: 16px;
}

.ai-upload-section {
    background: rgba(255,255,255,0.12);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
}

.ai-step {
    margin-bottom: 20px;
}

.ai-step:last-child {
    margin-bottom: 0;
}

.ai-step strong {
    display: block;
    margin-bottom: 12px;
    color: #fff;
    font-size: 16px;
}

/* Preview de imágenes subidas */
#ai-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    min-height: 0;
}

#ai-image-preview .ai-image-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: visible;
    border: 2px solid rgba(255,255,255,0.5);
}

#ai-image-preview .ai-image-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

#ai-image-preview .remove-ai-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e53e3e;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    padding: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Botón subir fotos */
.upload-ai-images-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-decoration: none !important;
}

.upload-ai-images-btn:hover {
    background: rgba(255,255,255,0.3) !important;
    border-color: #fff !important;
}

/* Textarea descripción */
#ai-description-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

#ai-description-input:focus {
    outline: none;
    border-color: #fff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

#ai-description-input::placeholder {
    color: #999;
}

/* Sección acción */
.ai-action {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid rgba(255,255,255,0.2);
    margin-top: 5px;
}

/* Botón analizar con IA */
#analyze-with-ai-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 18px !important;
    padding: 16px 48px !important;
    background: #fff !important;
    color: #667eea !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    min-width: 220px;
    justify-content: center;
}

#analyze-with-ai-btn:hover:not(:disabled) {
    background: #f7f7f7 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25) !important;
}

#analyze-with-ai-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Mensajes resultado IA */
.ai-result-message {
    margin-top: 15px;
    padding: 14px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    display: none;
}

.ai-result-message.success {
    background: rgba(56, 161, 105, 0.95);
    color: #fff;
    display: block;
}

.ai-result-message.error {
    background: rgba(229, 62, 62, 0.95);
    color: #fff;
    display: block;
}

/* Responsive móvil */
@media (max-width: 600px) {
    .veneprop-ai-assistant-box {
        padding: 18px;
    }

    .veneprop-ai-assistant-box h3 {
        font-size: 18px;
    }

    .ai-upload-section {
        padding: 15px;
    }

    #analyze-with-ai-btn {
        width: 100% !important;
        font-size: 16px !important;
        padding: 14px 20px !important;
    }

    .upload-ai-images-btn {
        width: 100% !important;
        justify-content: center;
        text-align: center;
    }
}
