/**
 * MF Unified Tickets - Account Styles
 *
 * Styles for My Account ticket-linking and dependents pages.
 *
 * @package MF_Unified_Tickets
 */

/* Ticket Linking Page */
.mf-ticket-linking-page {
    padding: 20px 0;
}

.mf-ticket-linking-page h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.mf-ticket-linking-page h3 {
    font-size: 1.2em;
    margin: 25px 0 15px;
    color: #333;
}

/* Event Groups */
.mf-event-group {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.mf-event-group h3 {
    margin-top: 0;
    color: #0073aa;
}

.mf-event-group .event-id {
    background: #0073aa;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    margin-left: 10px;
    font-weight: normal;
}

/* Ticket Cards */
.mf-ticket-list {
    display: grid;
    gap: 15px;
}

.mf-ticket-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mf-ticket-card.linked {
    border-color: #46b450;
    background: linear-gradient(to right, #e7f7e7 0%, #fff 100%);
}

.mf-ticket-card.unlinked {
    border-color: #ffb900;
    background: linear-gradient(to right, #fff8e5 0%, #fff 100%);
}

.mf-ticket-card .ticket-icon {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mf-ticket-card .ticket-icon.adult {
    background: #e1f0ff;
    color: #0073aa;
}

.mf-ticket-card .ticket-icon.dependent {
    background: #f3e8ff;
    color: #7c3aed;
}

.mf-ticket-card .ticket-icon svg {
    width: 24px;
    height: 24px;
}

.mf-ticket-card .ticket-details {
    flex: 1;
    min-width: 0;
}

.mf-ticket-card .ticket-name {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mf-ticket-card .ticket-type {
    font-size: 0.85em;
    color: #666;
}

.mf-ticket-card .ticket-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mf-ticket-card select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mf-ticket-card button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.mf-ticket-card button.link-btn {
    background: #0073aa;
    color: #fff;
}

.mf-ticket-card button.link-btn:hover {
    background: #005a87;
}

.mf-ticket-card button.unlink-btn {
    background: #dc3545;
    color: #fff;
}

.mf-ticket-card button.unlink-btn:hover {
    background: #c82333;
}

.mf-ticket-card button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Character Info Display */
.mf-character-info {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-radius: 4px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mf-character-info .character-name {
    font-weight: 600;
    color: #2d6a2d;
}

.mf-character-info .linked-date {
    font-size: 0.8em;
    color: #666;
}

/* Dependents Page */
.mf-dependents-page {
    padding: 20px 0;
}

.mf-dependents-page h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.mf-dependent-list {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.mf-dependent-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.mf-dependent-card .dependent-avatar {
    width: 60px;
    height: 60px;
    background: #f3e8ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #7c3aed;
    font-size: 1.5em;
    font-weight: bold;
}

.mf-dependent-card .dependent-details {
    flex: 1;
}

.mf-dependent-card .dependent-name {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 5px;
}

.mf-dependent-card .dependent-id {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
}

.mf-dependent-card .dependent-id code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.mf-dependent-card .dependent-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: #666;
}

.mf-dependent-card .dependent-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mf-dependent-card input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 180px;
}

.mf-dependent-card button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mf-dependent-card button.save-btn {
    background: #46b450;
    color: #fff;
}

.mf-dependent-card button.delete-btn {
    background: #dc3545;
    color: #fff;
}

/* Add Dependent Form */
.mf-add-dependent {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
}

.mf-add-dependent h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #666;
}

.mf-add-dependent.disabled {
    opacity: 0.6;
}

.mf-add-dependent .limit-notice {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 10px;
}

.mf-add-dependent input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    margin-right: 10px;
}

.mf-add-dependent button {
    padding: 10px 20px;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mf-add-dependent button:hover {
    background: #6d28d9;
}

.mf-add-dependent button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Messages */
.mf-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.mf-message.success {
    background: #e7f7e7;
    border: 1px solid #c3e6c3;
    color: #2d6a2d;
}

.mf-message.error {
    background: #fce8e8;
    border: 1px solid #f5c6c6;
    color: #c82333;
}

.mf-message.info {
    background: #e8f4fc;
    border: 1px solid #b8daef;
    color: #31708f;
}

/* Loading States */
.mf-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.mf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: mf-spin 1s linear infinite;
}

@keyframes mf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty States */
.mf-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.mf-empty-state svg {
    width: 64px;
    height: 64px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.mf-empty-state h4 {
    margin: 0 0 10px;
    color: #333;
}

.mf-empty-state p {
    margin: 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .mf-ticket-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mf-ticket-card .ticket-icon {
        align-self: center;
    }
    
    .mf-ticket-card .ticket-actions {
        width: 100%;
    }
    
    .mf-ticket-card select {
        width: 100%;
        min-width: auto;
    }
    
    .mf-dependent-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .mf-dependent-card .dependent-stats {
        justify-content: center;
    }
    
    .mf-add-dependent input {
        width: 100%;
        margin: 0 0 10px 0;
    }
}
