/* Client page specific styles */

:root {
    --card-border-radius: 12px;
    --card-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* Hide consultant name in header */
#consultant-info {
    display: none;
}

.clients-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Client filters */
.client-filters {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.filter-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    background-color: #f1f5fb;
    color: #4a6da7;
    border: 1px solid #e3eaf4;
}

.filter-btn.active {
    background-color: #4a6da7;
    color: white;
}

/* Button styles */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a5a8a;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #f1f5fb;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: #e3eaf4;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #ffebee;
    color: #c62828;
}

.btn-danger:hover {
    background-color: #ffcdd2;
    transform: translateY(-1px);
}

.add-client {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.add-client h1 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 0;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto; /* Reduced from 10% to 5% to position higher */
    padding: 2rem;
    border-radius: var(--card-border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 85vh; /* Added to ensure modal doesn't exceed screen height */
    overflow-y: auto; /* Added to enable scrolling when content is too tall */
    box-shadow: var(--card-shadow);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: var(--secondary-color);
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-speed);
    line-height: 1;
}

.close:hover {
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Token display styles */
.token-display {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: #f9fbfd;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
}

.token-value, .token-link {
    word-break: break-all;
    font-family: monospace;
    margin: 0.75rem 0;
    padding: 0.75rem;
    background-color: #f1f5fb;
    border-radius: 6px;
    border: 1px solid #e3eaf4;
    font-size: 0.875rem;
}

.copy-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background-color var(--transition-speed);
    position: relative;
}

.copy-btn:hover {
    background-color: #3a5a8a;
}

/* Animation for copy success */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.copy-success {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    animation: fadeInOut 2s ease-in-out forwards;
    white-space: nowrap;
    pointer-events: none;
}

/* Animation for token generation */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 111, 165, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(74, 111, 165, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 111, 165, 0); }
}

.token-pulse {
    animation: pulse 1.5s ease-in-out;
}

/* PIN Notification Styles */
.pin-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    animation: slideIn 0.3s ease-out;
}

.pin-notification-icon {
    color: var(--primary-color);
    font-size: 18px;
    margin-top: 2px;
}

.pin-notification-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
}

.pin-notification-content strong {
    color: var(--primary-color);
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--secondary-color);
    background-color: #f9fbfd;
    border-radius: var(--card-border-radius);
    border: 1px dashed var(--border-color);
}

.empty-state p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .client-card {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .client-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%; /* Full width buttons on mobile */
    }
    
    .add-client {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn {
        padding: 0.625rem 0.875rem;
        min-width: 80px;
    }
}

/* Large screen adjustments */
@media (min-width: 1200px) {
    .client-card {
        padding: 1.5rem;
        column-gap: 3rem; /* More space between columns on larger screens */
    }
    
    .client-actions {
        gap: 0.75rem;
    }
    
    .btn {
        min-width: 100px;
    }
}
