/**
 * Longhorn CRM Public Styles
 */

/* Lead Forms */
.longhorn-form {
    max-width: 500px;
    margin: 0 auto;
}

.longhorn-form .form-group {
    margin-bottom: 20px;
}

.longhorn-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.longhorn-form input[type="text"],
.longhorn-form input[type="email"],
.longhorn-form input[type="tel"],
.longhorn-form textarea,
.longhorn-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.longhorn-form input:focus,
.longhorn-form textarea:focus,
.longhorn-form select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.longhorn-form .submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.longhorn-form .submit-btn:hover {
    background: #005a87;
}

.longhorn-form .submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.longhorn-form .form-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.longhorn-form .form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.longhorn-form .form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dealer Locator */
.longhorn-dealer-locator {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    min-height: 500px;
}

.dealer-search-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
}

.dealer-search-panel h3 {
    margin: 0 0 15px;
}

.dealer-search-panel .search-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.dealer-search-panel input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.dealer-search-panel .search-btn {
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.dealer-list {
    max-height: 400px;
    overflow-y: auto;
}

.dealer-item {
    padding: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: box-shadow 0.3s;
}

.dealer-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dealer-item h4 {
    margin: 0 0 5px;
}

.dealer-item .distance {
    color: #666;
    font-size: 14px;
}

.dealer-item .address {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.dealer-item .actions {
    margin-top: 10px;
}

.dealer-item .actions a {
    display: inline-block;
    padding: 5px 10px;
    font-size: 13px;
    text-decoration: none;
}

.dealer-map {
    border-radius: 4px;
    overflow: hidden;
}

#dealer-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Reviews */
.longhorn-reviews {
    padding: 40px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.review-card .stars {
    color: #f39c12;
    font-size: 20px;
    margin-bottom: 15px;
}

.review-card .content {
    font-style: italic;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
}

.review-card .reviewer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-card .reviewer-name {
    font-weight: 600;
}

.review-card .reviewer-location {
    color: #666;
    font-size: 14px;
}

/* Products Grid */
.longhorn-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card .product-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.product-card .product-info {
    padding: 20px;
}

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

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

.product-card .product-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

/* Portal Styles */
.longhorn-portal {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: 250px;
    background: #1d2327;
    color: #fff;
    padding: 20px 0;
}

.portal-sidebar .logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid #3c434a;
}

.portal-sidebar nav {
    padding: 20px 0;
}

.portal-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #a7aaad;
    text-decoration: none;
    transition: all 0.3s;
}

.portal-sidebar nav a:hover,
.portal-sidebar nav a.active {
    background: #2c3338;
    color: #fff;
}

.portal-sidebar nav a .dashicons {
    font-size: 18px;
}

.portal-content {
    flex: 1;
    padding: 30px;
    background: #f0f0f1;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.portal-header h1 {
    margin: 0;
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.portal-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.portal-card h3 {
    margin: 0 0 10px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.portal-card .value {
    font-size: 32px;
    font-weight: 600;
}

/* Portal Dashboard (fallback styles when theme CSS isn't loaded) */
.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.portal-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.portal-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 6px;
}

.portal-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #333;
}

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

.portal-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.portal-card-body {
    padding-top: 4px;
}

/* Lead pipeline */
.longhorn-pipeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.pipeline-stage {
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
}
.pipeline-stage .count {
    font-size: 22px;
    font-weight: 700;
    color: #333;
}
.pipeline-stage .label {
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    margin-top: 4px;
}

/* Tables */
.portal-table {
    width: 100%;
    border-collapse: collapse;
}
.portal-table th,
.portal-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}
.portal-table th {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    background: #f8f9fa;
}
.portal-table-actions {
    display: flex;
    gap: 8px;
}

/* Activity feed */
.portal-activity-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}
.portal-activity-item {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
}
.portal-activity-indicator { width: 12px; display: flex; justify-content: center; }
.portal-activity-dot { width: 6px; height: 6px; background: #DAA520; border-radius: 50%; margin-top: 8px; }
.portal-activity-text { margin: 0; color: #333; }
.portal-activity-time { font-size: 12px; color: #666; }

/* Empty state */
.portal-empty-state { text-align: center; padding: 30px; color: #666; }
.portal-empty-title { margin: 8px 0; font-size: 18px; }
.portal-empty-text { margin: 0 0 12px; }

/* Responsive */
@media screen and (max-width: 768px) {
    .longhorn-dealer-locator {
        grid-template-columns: 1fr;
    }

    .dealer-search-panel {
        order: -1;
    }

    .longhorn-portal {
        flex-direction: column;
    }

    .portal-sidebar {
        width: 100%;
    }

    .portal-sidebar nav {
        display: flex;
        overflow-x: auto;
        padding: 10px;
    }

    .portal-sidebar nav a {
        padding: 10px 15px;
        white-space: nowrap;
    }
}
