/**
 * Add Character Modal CSS
 * Eternal Illusion - Karakter hozzáadás modal stílusok
 * 2025. október 27.
 */

/* ===== MODAL SIZE OVERRIDE ===== */

/* Karakter Modal szélesebb legyen */
.modal-content:has(.add-character-content) {
    max-width: 1000px !important;
    width: 95% !important;
    min-height: 600px;
}

/* Responsive tablet esetén */
@media (max-width: 1024px) {
    .modal-content:has(.add-character-content) {
        max-width: 90% !important;
        width: 90% !important;
    }
}

/* Responsive mobil esetén */
@media (max-width: 768px) {
    .modal-content:has(.add-character-content) {
        max-width: 95% !important;
        width: 95% !important;
        min-height: auto;
        margin: 10px;
    }
    
    .character-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .character-ilvl {
        order: -1; /* Item level felülre mobil esetén */
    }
}

/* ===== ADD CHARACTER MAIN CONTAINER ===== */

.add-character-content {
    min-height: 400px;
    position: relative;
}

.character-phase {
    animation: fadeIn 0.5s ease-in-out;
}

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

/* ===== PHASE 1: CHARACTER SEARCH ===== */

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header i {
    font-size: 2.5rem;
    color: #00bcd4;
    margin-bottom: 15px;
    display: block;
}

.search-header h3 {
    color: #ffd700;
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.search-header p {
    color: #b0b0b0;
    margin: 0;
    line-height: 1.4;
}

.character-search-form {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: #e0e6ed;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.character-input,
.character-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 30, 50, 0.8);
    border: 2px solid rgba(0, 188, 212, 0.3);
    border-radius: 8px;
    color: #e0e6ed;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.character-input:focus,
.character-select:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.3);
    background: rgba(30, 30, 50, 0.9);
}

.character-input.valid {
    border-color: #4caf50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.character-input.invalid {
    border-color: #f44336;
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.2);
}

.input-feedback {
    margin-top: 5px;
    font-size: 0.85rem;
    min-height: 20px;
}

.input-feedback.valid {
    color: #4caf50;
}

.input-feedback.invalid {
    color: #f44336;
}

.form-actions {
    text-align: center;
    margin: 30px 0 20px 0;
}

.search-btn {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.search-btn:enabled:hover {
    background: linear-gradient(135deg, #0097a7 0%, #00838f 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.3);
}

.search-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-info {
    background: rgba(0, 188, 212, 0.1);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 6px;
    padding: 12px;
    font-size: 0.9rem;
    color: #80deea;
    text-align: center;
}

.search-info i {
    margin-right: 8px;
    color: #00bcd4;
}

/* ===== PHASE 2: LOADING ===== */

.loading-container {
    text-align: center;
    padding: 50px 20px;
}

.loading-spinner i {
    font-size: 3rem;
    color: #00bcd4;
    margin-bottom: 20px;
}

.loading-container h3 {
    color: #ffd700;
    margin: 0 0 10px 0;
    font-size: 1.4rem;
}

.loading-container p {
    color: #b0b0b0;
    margin: 0 0 30px 0;
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 300px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00bcd4, #4fc3f7, #00bcd4);
    background-size: 200% 100%;
    animation: progressMove 2s linear infinite;
    width: 100%;
}

@keyframes progressMove {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== PHASE 3: CHARACTER DISPLAY ===== */

.character-display {
    max-width: 900px; /* Szélesebb */
    margin: 0 auto;
}

.character-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.8), rgba(20, 20, 40, 0.9));
    border-radius: 15px;
    border: 2px solid rgba(0, 188, 212, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.character-avatar {
    position: relative;
    flex-shrink: 0;
}

.char-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #00bcd4;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

.character-level {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #ffd700;
    color: #1a1a2e;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    border: 2px solid #1a1a2e;
    min-width: 30px;
    text-align: center;
}

.character-info {
    flex: 1;
}

.character-name {
    color: #ffd700;
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.character-details {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.character-race,
.character-class,
.character-spec {
    background: rgba(0, 188, 212, 0.2);
    color: #80deea;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.character-realm {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.character-ilvl {
    text-align: center;
    flex-shrink: 0;
}

.ilvl-number {
    font-size: 2rem;
    font-weight: 900;
    color: #ff9800;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ilvl-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.stat-group {
    background: linear-gradient(135deg, rgba(30, 30, 50, 0.6), rgba(40, 40, 60, 0.4));
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 188, 212, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item i {
    color: #00bcd4;
    width: 16px;
    text-align: center;
}

.stat-label {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.stat-value {
    color: #e0e6ed;
    font-weight: 600;
    margin-left: auto;
}

.character-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.accept-btn,
.search-new-btn,
.cancel-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.accept-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

.accept-btn:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.search-new-btn {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.search-new-btn:hover {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

.cancel-btn {
    background: linear-gradient(135deg, #757575 0%, #616161 100%);
    color: white;
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #616161 0%, #424242 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(117, 117, 117, 0.3);
}

/* Character Already Exists Warning */
.character-exists-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
    color: white !important;
    padding: 15px 20px !important;
    border-radius: 10px !important;
    margin-top: 15px !important;
    text-align: center !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    animation: warningPulse 2s infinite alternate !important;
}

@keyframes warningPulse {
    from { box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3); }
    to { box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5); }
}

/* ===== PHASE 4: ERROR STATE ===== */

.error-container {
    text-align: center;
    padding: 40px 20px;
}

.error-icon i {
    font-size: 3rem;
    color: #f44336;
    margin-bottom: 20px;
}

.error-container h3 {
    color: #f44336;
    margin: 0 0 15px 0;
    font-size: 1.4rem;
}

.error-container p {
    color: #ffab91;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn {
    background: linear-gradient(135deg, #ff5722 0%, #d84315 100%);
    border: none;
    border-radius: 6px;
    color: white;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.retry-btn:hover {
    background: linear-gradient(135deg, #d84315 0%, #bf360c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.3);
}

/* ===== PHASE 5: SUCCESS STATE ===== */

.success-container {
    text-align: center;
    padding: 40px 20px;
}

.success-icon i {
    font-size: 3rem;
    color: #4caf50;
    margin-bottom: 20px;
}

.success-container h3 {
    color: #4caf50;
    margin: 0 0 15px 0;
    font-size: 1.4rem;
}

.success-container p {
    color: #c8e6c9;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.success-character {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    color: #a5d6a7;
}

.success-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border: none;
    border-radius: 6px;
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.success-btn:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

/* ===== WOW CLASS COLORS ===== */

.class-death-knight { color: #c41e3a; }
.class-demon-hunter { color: #a330c9; }
.class-druid { color: #ff7d0a; }
.class-evoker { color: #33937f; }
.class-hunter { color: #abd473; }
.class-mage { color: #69ccf0; }
.class-monk { color: #00ff96; }
.class-paladin { color: #f58cba; }
.class-priest { color: #ffffff; }
.class-rogue { color: #fff569; }
.class-shaman { color: #0070de; }
.class-warlock { color: #9482c9; }
.class-warrior { color: #c79c6e; }

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .character-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .character-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .character-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .character-actions button {
        min-width: auto;
    }
}