/* ==========================================================================
   1. 기본 이벤트 레이아웃
   ========================================================================== */
.event-info-wrap {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ==========================================================================
   2. 이벤트 타임라인 섹션 (view_event_ui.skin.php)
   ========================================================================== */
.event-timeline {
    background-color: #f9f9f9;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.event-timeline-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 10px;
}

.event-timeline-left {
    flex: 1;
    min-width: 220px;
    border-right: 1px dashed #ddd;
    padding-right: 20px;
}

.event-timeline-right {
    flex: 2;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 20px;
}

.event-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 600;
}

.event-status-upcoming {
    background-color: #e1f5fe;
    color: #0288d1;
}

.event-status-ongoing {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.event-status-ended {
    background-color: #eeeeee;
    color: #757575;
}

/* 세로로 정렬된 날짜 스타일 */
.event-dates-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.event-date-item-vertical {
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.event-date-label-vertical {
    font-size: 0.85em;
    color: #757575;
    margin-bottom: 5px;
}

.event-date-value-vertical {
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   3. 카운트다운 타이머 (view_event_ui.skin.php)
   ========================================================================== */
.countdown-container {
    text-align: center;
    width: 100%;
}

.countdown-label {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.countdown-time-unit {
    text-align: center;
}

.countdown-time {
    background: linear-gradient(to bottom, #4CAF50, #3e8e41);
    color: white;
    font-size: 2.8em;
    font-weight: bold;
    padding: 10px 0;
    border-radius: 8px;
    min-width: 80px;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    line-height: 1;
    white-space: nowrap;
}

.countdown-unit {
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    font-weight: 600;
}

.countdown-separator {
    font-size: 2.5em;
    color: #999;
    margin-top: -10px;
}

.countdown-ended {
    text-align: center;
    color: #757575;
    padding: 20px;
}

.countdown-ended .fa-check-circle {
    color: #4CAF50;
    margin-bottom: 15px;
}

.countdown-ended-text {
    font-size: 1.5em;
    font-weight: 600;
}

/* 시간 간격 카운트다운 */
.interval-countdown-container {
    margin-top: 15px;
    background-color: #fff;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
}

.interval-countdown-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.interval-countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.interval-time-unit {
    text-align: center;
}

.interval-time {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
    font-size: 1.2em;
    font-weight: bold;
    padding: 5px;
    border-radius: 3px;
    min-width: 30px;
    display: inline-block;
}

.interval-unit {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.interval-separator {
    font-size: 1.2em;
    color: #999;
}

/* ==========================================================================
   4. 이벤트 정보 탭 섹션 (view_event_ui.skin.php)
   ========================================================================== */
.event-info-details {
    padding: 15px;
}

.event-info-section {
    margin-bottom: 25px;
}

.event-info-section h4 {
    font-size: 1.1em;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

/* 기본정보 필드 스타일 */
.event-info-fields {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
}

.event-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-info-list .event-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin: 5px 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: left;
}

.event-info-list .event-info-label {
    font-weight: 600;
    margin-bottom: 0;
    color: #333;
}

.event-info-list .event-info-value {
    color: #555;
}

/* 진행률 바 */
.event-progress {
    margin-top: 15px;
}

.event-progress-bar {
    width: 100%;
    height: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
}

.event-progress-fill {
   height: 100%;
   background: linear-gradient(to right, #4CAF50, #8BC34A);
   border-radius: 5px;
   transition: width 0.5s ease-in-out;
}

.event-progress-text {
   margin-top: 5px;
   text-align: right;
   font-size: 0.85em;
   color: #666;
}

/* ==========================================================================
   5. 이벤트 탭 메뉴 (view_event_ui.skin.php)
   ========================================================================== */
.event-tab-container {
    margin-top: 20px;
}

.event-tab-buttons {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.event-tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.event-tab-btn:hover {
    color: #333;
}

.event-tab-btn.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.event-tab-content {
    position: relative;
}

.event-tab-pane {
    display: none;
}

.event-tab-pane.active {
    display: block;
}

/* ==========================================================================
   6. 응모 조건 섹션 (view_event_ui.skin.php)
   ========================================================================== */
.condition-summary {
    margin-bottom: 20px;
}

.condition-card {
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: 100%;
}

.condition-card-header {
    background-color: #f1f1f1;
    padding: 10px;
    border-radius: 5px 5px 0 0;
    font-weight: 600;
    text-align: center;
    color: #555;
}

.condition-card-body {
    padding: 15px;
    text-align: center;
}

.badge {
    padding: 5px 8px;
    margin-bottom: 5px;
    display: inline-block;
}

.badge-primary {
    background-color: #007bff;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-light {
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
}

.condition-subtitle {
    margin: 15px 0;
    padding-bottom: 8px;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    color: #444;
}

.additional-conditions {
    margin-top: 15px;
}

/* ==========================================================================
   7. 이벤트 응모 버튼 (view_event_entry.skin.php)
   ========================================================================== */
.event-entry-section {
   text-align: center;
   margin-top: 20px;
}

.event-entry-btn {
   display: inline-block;
   padding: 12px 30px;
   background-color: #4CAF50;
   color: white;
   border: none;
   border-radius: 5px;
   font-size: 1.1em;
   font-weight: 600;
   cursor: pointer;
   transition: background-color 0.3s;
}

.event-entry-btn:hover {
   background-color: #3e8e41;
}

.event-entry-limit-msg {
   padding: 10px 15px;
   background-color: #fff3e0;
   color: #e65100;
   border-radius: 5px;
   font-weight: 600;
}

.event-entry-upcoming {
   padding: 10px 15px;
   background-color: #e3f2fd;
   color: #1565c0;
   border-radius: 5px;
   font-weight: 600;
}

.event-entry-ended {
   padding: 10px 15px;
   background-color: #f1f1f1;
   color: #616161;
   border-radius: 5px;
   font-weight: 600;
}

.view-winners-btn-wrap {
    text-align: center;
}

/* ==========================================================================
   8. 상품 슬라이드 모달 (view_event_entry.skin.php)
   ========================================================================== */
/* 모달 기본 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h4 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* 상품 슬라이드 관련 스타일 */
.swipe-guide {
    text-align: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9em;
}

.product-slide {
    padding: 10px;
}

.product-image {
    text-align: center;
    margin-bottom: 15px;
}

.full-width-img {
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
}

.product-description {
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    line-height: 1.5;
}

.entry-slide {
    padding: 20px;
    text-align: center;
}

.entry-button-container {
    max-width: 400px;
    margin: 0 auto;
}

.entry-final-title {
    margin-bottom: 15px;
    color: #4CAF50;
}

.entry-final-desc {
    margin-bottom: 20px;
    color: #666;
}

.entry-info-summary {
    margin: 20px 0;
}

.entry-info-box {
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}

.entry-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.entry-info-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.bg-danger-light {
    background-color: #ffebee;
}

.bg-warning-light {
    background-color: #fff8e1;
}

.bg-success-light {
    background-color: #e8f5e9;
}

.bg-info-light {
    background-color: #e1f5fe;
}

.bg-primary-light {
    background-color: #e3f2fd;
}

.bg-purple-light {
    background-color: #f3e5f5;
}

.text-danger {
    color: #f44336;
}

.text-warning {
    color: #ff9800;
}

.text-success {
    color: #4CAF50;
}

.text-info {
    color: #2196F3;
}

.text-primary {
    color: #2196F3;
}

.text-purple {
    color: #9c27b0;
}

.entry-info-content {
    flex-grow: 1;
}

.entry-info-label {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 3px;
}

.entry-info-value {
    font-weight: 600;
}

.no-products {
    text-align: center;
    padding: 30px;
    background-color: #f5f5f5;
    border-radius: 5px;
    color: #666;
}

/* Swiper 페이지네이션 스타일 */
.swiper-pagination {
    position: static;
    margin-top: 15px;
    margin-bottom: 15px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background-color: #4CAF50;
}

/* ==========================================================================
   9. 응모자 목록 모달 (view_event_entry.skin.php)
   ========================================================================== */
.modal-search {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.entries-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.entries-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.entries-list-item:last-child {
    border-bottom: none;
}

.entries-list-item.winner {
    background-color: #fff8e1;
}

.entry-info {
    display: flex;
    align-items: center;
}

.entry-id {
    font-weight: 600;
}

.entry-nick {
    color: #777;
}

.entry-meta {
    display: flex;
    align-items: center;
}

.entry-date {
    color: #999;
    font-size: 0.9em;
    margin-right: 10px;
}

.winner-icon {
    color: #ffc107;
    margin-right: 10px;
}

.cancel-entry-btn {
    background-color: transparent;
    color: #dc3545;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    padding: 2px 5px;
}

.filter-status {
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #666;
}

.reset-filter {
    color: #007bff;
    text-decoration: none;
}

.no-entries {
    text-align: center;
    padding: 30px;
    color: #666;
}

.error-message {
    color: #dc3545;
    text-align: center;
    padding: 15px;
}

/* ==========================================================================
   10. 당첨자 목록 섹션 (view_event_winners.skin.php)
   ========================================================================== */
.event-winners {
   background-color: #f9f9f9;
   border-radius: 5px;
   padding: 15px;
}

.winner-list {
   list-style: none;
   padding: 0;
   margin: 0;
   display: flex;
   flex-wrap: wrap;
}

.winner-item {
   flex: 1;
   min-width: 230px;
   margin: 5px;
   padding: 10px;
   background-color: #fff;
   border-radius: 5px;
   box-shadow: 0 1px 3px rgba(0,0,0,0.05);
   display: flex;
   align-items: center;
}

.winner-num {
   width: 24px;
   height: 24px;
   background-color: #4CAF50;
   color: white;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 0.8em;
   margin-right: 10px;
   flex-shrink: 0;
}

.winner-id {
   font-weight: 600;
   color: #333;
}

.winner-nick {
   margin-left: 5px;
   color: #777;
   font-size: 0.9em;
}

.winner-datetime {
   margin-left: auto;
   color: #999;
   font-size: 0.8em;
}

/* ==========================================================================
   11. 관리자 기능 섹션 (view_event_admin.skin.php)
   ========================================================================== */
.admin-section {
    margin-top: 30px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.admin-section h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.admin-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

/* ==========================================================================
   12. 히스토리 모달 (view_event_admin.skin.php)
   ========================================================================== */
.modal-filter-bar {
    padding: 10px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.btn-group {
    display: inline-flex;
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-outline-primary:hover, 
.btn-outline-primary.active {
    background-color: #007bff;
    color: white;
}

.history-timeline {
    padding: 10px;
}

.history-item {
    display: flex;
    margin-bottom: 20px;
    padding-left: 20px;
    position: relative;
}

.history-item:before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #eee;
}

.history-icon {
    position: absolute;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin-left: -10px;
    color: #4CAF50;
}

.history-content {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
    flex-grow: 1;
    margin-right: 10px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.history-date {
    font-size: 0.8em;
    color: #999;
}

.history-action {
    font-size: 0.8em;
    font-weight: bold;
    color: #333;
}

.history-desc {
    margin-bottom: 5px;
}

.history-data {
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 3px;
    font-size: 0.85em;
    margin-top: 5px;
}

.history-data-item {
    margin-bottom: 3px;
}

.history-data-key {
    font-weight: 600;
    color: #333;
}

.history-data-value {
    color: #666;
}

.history-user {
    min-width: 100px;
    text-align: right;
    font-size: 0.85em;
    color: #666;
}

.history-admin .history-icon {
    color: #dc3545;
}

.history-extended .history-icon {
    color: #17a2b8;
}

.history-winners .history-icon {
    color: #ffc107;
}

.history-ended .history-icon {
    color: #6c757d;
}

.history-reset .history-icon {
    color: #dc3545;
}

.no-history {
    text-align: center;
    padding: 30px;
    color: #666;
}

/* ==========================================================================
   13. 유틸리티 클래스 (공통)
   ========================================================================== */
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.mr-1 { margin-right: 5px; }
.mr-2 { margin-right: 10px; }
.mr-3 { margin-right: 15px; }
.px-1 { padding-left: 5px; padding-right: 5px; }
.px-2 { padding-left: 10px; padding-right: 10px; }
.px-3 { padding-left: 15px; padding-right: 15px; }
.py-1 { padding-top: 5px; padding-bottom: 5px; }
.py-2 { padding-top: 10px; padding-bottom: 10px; }
.py-3 { padding-top: 15px; padding-bottom: 15px; }

/* ==========================================================================
   14. 반응형 스타일 (공통)
   ========================================================================== */
@media (max-width: 768px) {
    .event-timeline-container {
        flex-direction: column;
    }
    
    .event-timeline-left {
        border-right: none;
        border-bottom: 1px dashed #ddd;
        padding-right: 0;
        padding-bottom: 20px;
        width: 100%;
    }
    
    .event-timeline-right {
        padding-left: 0;
        width: 100%;
        padding-top: 20px;
    }
    
    .countdown-time {
        font-size: 2em;
        min-width: 50px;
        width: 50px;
        height: 50px;
        padding: 10px 5px;
    }
    
    .countdown-separator {
        font-size: 1.8em;
    }
    
    .admin-buttons {
        flex-direction: column;
    }
    
    .winner-item {
        min-width: 100%;
    }
    
    .condition-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .countdown-time {
        font-size: 1.5em;
        min-width: 40px;
        width: 40px;
        height: 40px;
    }
    
    .countdown-separator {
        font-size: 1.5em;
    }
    
    .modal-content {
        width: 95%;
    }
}