/**
 * IAM Empire Comments System - CSS
 * Design: #0a0a14, #151525, #e0e0ff, #b19cd9, #2a2a4a
 */

.iam-comments-container {
    margin: 40px 0;
    padding: 30px;
    background: #151525;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Title */
.iam-comments-title {
    color: #b19cd9;
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a2a4a;
}

/* Empty state */
.iam-comments-empty {
    color: #8888cc;
    text-align: center;
    padding: 30px;
    font-style: italic;
    background: rgba(42, 42, 74, 0.3);
    border-radius: 8px;
    margin: 20px 0;
}

/* Comment Form */
.iam-comment-form {
    background: rgba(10, 10, 20, 0.5);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #2a2a4a;
    margin-bottom: 30px;
}

.iam-form-title {
    color: #e0e0ff;
    font-size: 18px;
    margin-bottom: 20px;
}

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

.iam-form-group label {
    display: block;
    color: #8888cc;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.iam-form-group input,
.iam-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: #0a0a14;
    border: 1px solid #2a2a4a;
    border-radius: 6px;
    color: #e0e0ff;
    font-size: 16px;
    transition: border-color 0.2s;
}

.iam-form-group input:focus,
.iam-form-group textarea:focus {
    outline: none;
    border-color: #b19cd9;
    box-shadow: 0 0 0 2px rgba(177, 156, 217, 0.2);
}

.iam-form-group input::placeholder,
.iam-form-group textarea::placeholder {
    color: #666699;
}

.iam-char-count {
    text-align: right;
    font-size: 12px;
    color: #8888cc;
    margin-top: 5px;
}

.iam-char-current {
    font-weight: bold;
}

/* Form Actions */
.iam-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.iam-submit-btn,
.iam-cancel-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.iam-submit-btn {
    background: #b19cd9;
    color: #0a0a14;
}

.iam-submit-btn:hover {
    background: #9d8ac5;
    transform: translateY(-1px);
}

.iam-submit-btn:active {
    transform: translateY(0);
}

.iam-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.iam-cancel-btn {
    background: transparent;
    color: #8888cc;
    border: 1px solid #2a2a4a;
}

.iam-cancel-btn:hover {
    background: rgba(42, 42, 74, 0.3);
    color: #e0e0ff;
}

/* Form Info */
.iam-form-info {
    margin-top: 20px;
    font-size: 12px;
    color: #666699;
    line-height: 1.5;
}

/* Comments List */
.iam-comments-list {
    margin-top: 30px;
}

/* Single Comment */
.iam-comment {
    background: rgba(10, 10, 20, 0.3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #2a2a4a;
    margin-bottom: 20px;
}

.iam-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a4a;
}

.iam-comment-author {
    color: #b19cd9;
    font-size: 16px;
}

.iam-comment-date {
    color: #666699;
    font-size: 14px;
}

.iam-comment-content {
    color: #e0e0ff;
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-wrap;
}

.iam-comment-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(42, 42, 74, 0.5);
}

.iam-reply-btn {
    background: transparent;
    color: #8888cc;
    border: 1px solid #2a2a4a;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.iam-reply-btn:hover {
    background: rgba(42, 42, 74, 0.3);
    color: #e0e0ff;
}

.iam-reply-count {
    color: #666699;
    font-size: 14px;
}

/* Replies */
.iam-replies-container {
    margin-top: 20px;
    margin-left: 30px;
    padding-left: 20px;
    border-left: 2px solid #2a2a4a;
}

.iam-replies-container .iam-comment {
    background: rgba(10, 10, 20, 0.2);
    border-color: rgba(42, 42, 74, 0.7);
}

/* Loading State */
.iam-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #8888cc;
    font-size: 16px;
}

.iam-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #2a2a4a;
    border-top-color: #b19cd9;
    border-radius: 50%;
    animation: iam-spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes iam-spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.iam-error,
.iam-success {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    animation: iam-fade-in 0.3s ease;
}

.iam-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.iam-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

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

/* Responsive */
@media (max-width: 768px) {
    .iam-comments-container {
        padding: 20px;
        margin: 20px 0;
    }
    
    .iam-comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .iam-replies-container {
        margin-left: 15px;
        padding-left: 15px;
    }
    
    .iam-form-actions {
        flex-direction: column;
    }
    
    .iam-submit-btn,
    .iam-cancel-btn {
        width: 100%;
    }
}

/* Print */
@media print {
    .iam-comment-form,
    .iam-reply-btn,
    .iam-form-actions {
        display: none !important;
    }
}