/* Agent Dashboard Styles */

/* Main container */
.arsp-dashboard-container {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Dashboard navigation */
.arsp-dashboard-nav {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.arsp-dashboard-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.arsp-dashboard-nav li {
    padding: 10px 20px;
    cursor: pointer;
    margin-right: 5px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background-color: #f5f5f5;
}

.arsp-dashboard-nav li.active {
    background-color: #fff;
    border-color: #ddd;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
    font-weight: bold;
}

.arsp-dashboard-nav li:hover:not(.active) {
    background-color: #eaeaea;
}

/* Tab content */
.arsp-tab-content {
    display: none;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 4px;
}

.arsp-tab-content.active {
    display: block;
}

/* Profile card */
.arsp-profile-card {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.arsp-profile-header {
    background-color: aliceblue;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.arsp-profile-header h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.arsp-profile-url {
    margin-bottom: 0;
    word-break: break-all;
}

.arsp-profile-body {
    padding: 20px;
}

.arsp-profile-details p {
    margin-bottom: 10px;
}

.arsp-detail-label {
    font-weight: bold;
    display: inline-block;
    width: 80px;
}

.arsp-social-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.arsp-social-links h3 {
    margin-top: 0;
}

.arsp-social-links ul {
    list-style: none;
    padding: 0;
}

.arsp-social-links li {
    margin-bottom: 10px;
}

/* Edit profile form */
.arsp-edit-profile {
    max-width: 600px;
}

.arsp-form-field {
    margin-bottom: 15px;
}

.arsp-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.arsp-form-field input[type="text"],
.arsp-form-field input[type="email"],
.arsp-form-field input[type="tel"],
.arsp-form-field input[type="password"],
.arsp-form-field input[type="url"],
.arsp-form-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.arsp-form-field textarea {
    min-height: 100px;
}

.arsp-form-submit {
    margin-top: 20px;
}

.arsp-form-submit button {
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
}

/* Statistics tab */
.arsp-statistics h2 {
    margin-top: 0;
}

.arsp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.arsp-stats-card {
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.arsp-stats-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #555;
}

.arsp-stats-value {
    font-size: 28px;
    font-weight: bold;
}

.arsp-page-info {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
}

.arsp-url-display {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.arsp-url {
    flex: 1;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    word-break: break-all;
}

/* Messages */
.arsp-success {
    padding: 10px 15px;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
    margin-bottom: 20px;
}

.arsp-error {
    padding: 10px 15px;
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
    margin-bottom: 20px;
}

.arsp-hidden {
    display: none;
}

/* Login form */
.arsp-login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.arsp-login-form .arsp-form-field {
    margin-bottom: 15px;
}

.arsp-form-links {
    margin-top: 15px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .arsp-dashboard-nav ul {
        flex-direction: column;
    }
    
    .arsp-dashboard-nav li {
        margin-right: 0;
        margin-bottom: 5px;
        border-radius: 4px;
    }
    
    .arsp-dashboard-nav li.active {
        margin-bottom: 5px;
    }
    
    .arsp-tab-content {
        border-radius: 4px;
    }
    
    .arsp-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .arsp-url-display {
        flex-direction: column;
    }
    
    .arsp-url {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

.arsp-dashboard-nav li.arsp-logout {
    margin-left: auto;
}

.arsp-dashboard-nav li.arsp-logout a {
    color: #c62828;
    text-decoration: none;
}

.arsp-dashboard-nav li.arsp-logout a:hover {
    text-decoration: underline;
}

/* Chart container with horizontal scrolling */
.arsp-daily-views-chart {
    margin-top: 30px;
    overflow: hidden;
}

.arsp-chart {
    overflow-x: auto;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    scrollbar-width: thin;
}

/* Ensure the table has enough width for all columns */
.arsp-chart-table {
    min-width: 100%;
    width: auto;
    border-collapse: separate;
    border-spacing: 3px;
}

/* Ensure each column has a minimum width */
.arsp-chart-table td {
    min-width: 40px;
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
    .arsp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Make stats cards more compact on mobile */
    .arsp-stats-card {
        padding: 15px 10px;
    }
}