/* TCross Registration Modal Styles */

.tcross-registration-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: tcross-modal-fade-in 0.3s ease-out;
}

.tcross-registration-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes tcross-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tcross-modal-slide-in {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tcross-modal-content {
    background-color: #ffffff;
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: tcross-modal-slide-in 0.3s ease-out;
}

.tcross-modal-header {
    background: linear-gradient(135deg, #0073aa 0%, #005577 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.tcross-modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: white;
}

.tcross-modal-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tcross-modal-close:hover,
.tcross-modal-close:focus {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.tcross-modal-body {
    padding: 25px;
    max-height: 50vh;
    overflow-y: auto;
    line-height: 1.6;
}

.tcross-modal-body h4 {
    color: #0073aa;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.tcross-modal-body p {
    margin-bottom: 12px;
    color: #333;
}

.tcross-modal-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.tcross-modal-body li {
    margin-bottom: 8px;
    color: #555;
}

.tcross-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.tcross-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
}

.tcross-modal-btn-cancel {
    background-color: #f1f1f1;
    color: #666;
    border: 1px solid #ddd;
}

.tcross-modal-btn-cancel:hover {
    background-color: #e5e5e5;
    color: #333;
    transform: translateY(-1px);
}

.tcross-modal-btn-confirm {
    background: linear-gradient(135deg, #46b450 0%, #369e3f 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(70, 180, 80, 0.3);
}

.tcross-modal-btn-confirm:hover {
    background: linear-gradient(135deg, #369e3f 0%, #2e8836 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(70, 180, 80, 0.4);
}

.tcross-modal-btn-confirm:active {
    transform: translateY(0);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .tcross-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .tcross-modal-header {
        padding: 15px 20px;
    }
    
    .tcross-modal-header h3 {
        font-size: 1.2em;
        padding-right: 40px;
    }
    
    .tcross-modal-body {
        padding: 20px;
        max-height: 60vh;
    }
    
    .tcross-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .tcross-modal-btn {
        width: 100%;
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .tcross-modal-content {
        width: 98%;
        margin: 5px;
    }
    
    .tcross-modal-header {
        padding: 12px 15px;
    }
    
    .tcross-modal-body {
        padding: 15px;
        font-size: 14px;
    }
    
    .tcross-modal-footer {
        padding: 12px 15px;
    }
    
    .tcross-modal-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* 自定義滾動條 */
.tcross-modal-body::-webkit-scrollbar {
    width: 6px;
}

.tcross-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.tcross-modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tcross-modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading 狀態 */
.tcross-modal-btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.tcross-modal-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: tcross-spin 1s linear infinite;
}

@keyframes tcross-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 關閉動畫 */
.tcross-registration-modal.closing {
    animation: tcross-modal-fade-out 0.3s ease-in;
}

.tcross-registration-modal.closing .tcross-modal-content {
    animation: tcross-modal-slide-out 0.3s ease-in;
}

@keyframes tcross-modal-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes tcross-modal-slide-out {
    from { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
}
