/**
 * BALC User Claiming System - Frontend Styles
 * Location: /assets/frontend.css
 */

/* Container and Layout */
.balc-claim-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.balc-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.balc-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.balc-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

/* Notices */
.balc-notice {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.balc-notice-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
}

.balc-notice-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 4px solid #ff9800;
}

.balc-notice-icon {
    font-size: 20px;
    margin-right: 15px;
    flex-shrink: 0;
}

.balc-notice-content {
    flex: 1;
}

.balc-notice-content strong {
    display: block;
    margin-bottom: 5px;
}

.balc-notice-content p {
    margin: 0;
}

/* Statistics Bar */
.balc-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.balc-stat {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.balc-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.balc-stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.balc-stat-label {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.balc-section {
    background: white;
    padding: 30px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.balc-section-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
}

.balc-warning-icon {
    margin-right: 10px;
}

.balc-section-desc {
    color: #666;
    margin-bottom: 20px;
}

/* Conflicts Grid */
.balc-conflicts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.balc-conflict-card {
    padding: 15px;
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.balc-conflict-user {
    margin-bottom: 10px;
}

.balc-conflict-user strong {
    display: block;
    color: #333;
    margin-bottom: 3px;
}

.balc-email {
    font-size: 13px;
    color: #666;
}

.balc-conflict-info {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.balc-conflict-info small {
    display: block;
    color: #999;
    font-size: 11px;
    margin-bottom: 3px;
}

/* Toolbar */
.balc-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.balc-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.balc-selected-count {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.balc-search {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 250px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.balc-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Users Grid */
.balc-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.balc-user-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.balc-user-card:hover,
.balc-user-card.balc-hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.balc-user-card.balc-selected {
    background: linear-gradient(135deg, #f3f4ff 0%, #e8ebff 100%);
    border-color: #667eea;
}

.balc-user-card.balc-claimed {
    animation: claimSuccess 0.5s ease;
    background: #d4edda;
    border-color: #28a745;
}

@keyframes claimSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.balc-user-card-header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.balc-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.balc-user-info {
    flex: 1;
    cursor: pointer;
}

.balc-user-name {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 2px;
}

.balc-user-login {
    font-size: 13px;
    color: #666;
}

.balc-user-card-body {
    padding: 15px;
}

.balc-user-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.balc-user-detail:last-child {
    border-bottom: none;
}

.balc-label {
    color: #999;
    font-weight: 500;
}

.balc-value {
    color: #333;
    text-align: right;
}

.balc-value small {
    color: #999;
    font-size: 12px;
}

/* Buttons */
.balc-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.balc-btn:disabled,
.balc-btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.balc-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.balc-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.balc-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.balc-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.balc-btn-ready {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Form Actions */
.balc-form-actions {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    margin: -30px -30px -30px -30px;
    border-radius: 0 0 10px 10px;
}

/* Modal */
.balc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.balc-modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.balc-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balc-modal-header h3 {
    margin: 0;
    color: #333;
}

.balc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.balc-modal-close:hover {
    color: #333;
}

.balc-modal-body {
    padding: 20px;
}

.balc-form-group {
    margin-bottom: 20px;
}

.balc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.balc-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
}

.balc-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.balc-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Messages */
.balc-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

.balc-message-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.balc-message-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.balc-message-icon {
    font-size: 20px;
}

.balc-message-text {
    flex: 1;
}

/* Empty State */
.balc-empty-state {
    text-align: center;
    padding: 60px;
}

.balc-empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.balc-empty-state h3 {
    color: #333;
    margin-bottom: 15px;
}

.balc-empty-state ul {
    list-style: none;
    padding: 0;
    text-align: left;
    display: inline-block;
}

.balc-empty-state li {
    padding: 5px 0;
    color: #666;
}

.balc-empty-state li:before {
    content: "→ ";
    color: #667eea;
    font-weight: bold;
}

/* Success State */
.balc-success-state {
    text-align: center;
    padding: 60px;
}

.balc-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .balc-claim-container {
        padding: 10px;
    }
    
    .balc-header {
        padding: 20px;
    }
    
    .balc-header h2 {
        font-size: 24px;
    }
    
    .balc-stats-bar {
        grid-template-columns: 1fr;
    }
    
    .balc-users-grid {
        grid-template-columns: 1fr;
    }
    
    .balc-conflicts-grid {
        grid-template-columns: 1fr;
    }
    
    .balc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .balc-toolbar-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .balc-search {
        width: 100%;
    }
    
    .balc-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .balc-message {
        right: 10px;
        left: 10px;
    }
}

/* Print Styles */
@media print {
    .balc-btn,
    .balc-toolbar,
    .balc-modal,
    .balc-message {
        display: none !important;
    }
    
    .balc-user-card {
        page-break-inside: avoid;
    }
}