/* Patent Page Specific Styles */

/* 페이지 헤더 */
.patent-page-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, #0F4C5C, #1a5f6e);
    color: white;
    margin-bottom: 2rem;
}

.patent-page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* 검색 카드 스타일 */
.patent-search-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.patent-search-card .card-body {
    padding: 1.5rem;
}

/* 특허 목록 카드 */
.patent-list-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.patent-list-card .card-header {
    background: linear-gradient(135deg, #0F4C5C, #1a5f6e);
    color: white;
    border: none;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1rem 1.5rem;
}

.patent-list-card .card-header h5 {
    margin: 0;
    font-weight: 600;
}

/* 개별 특허 아이템 카드 */
.patent-item-card {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.patent-item-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #0F4C5C;
}

.patent-item-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0F4C5C;
    margin-bottom: 0.5rem;
}

.patent-item-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.patent-item-card .card-title a:hover {
    color: #1a5f6e;
}

.patent-item-card .card-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.patent-item-card .card-text {
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
}

.patent-item-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
}

/* 배지 스타일 */
.patent-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

.badge-promising {
    background-color: #ffc107;
    color: #000;
}

.badge-trl {
    background-color: #17a2b8;
    color: white;
}

.badge-category {
    background-color: #6c757d;
    color: white;
}

/* 찜하기 버튼 스타일 */
.favorite-btn {
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.favorite-btn:hover {
    transform: scale(1.05);
}

.favorite-btn.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.favorite-btn.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* 페이지네이션 스타일 */
.pagination {
    margin-top: 2rem;
}

.page-link {
    color: #0F4C5C;
    border-color: #dee2e6;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #f8f9fa;
    border-color: #0F4C5C;
    color: #0F4C5C;
}

.page-item.active .page-link {
    background-color: #0F4C5C;
    border-color: #0F4C5C;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

/* 토스트 스타일 */
.toast {
    border-radius: 0.375rem;
    backdrop-filter: blur(10px);
}

.toast.bg-success {
    background-color: rgba(40, 167, 69, 0.95) !important;
}

/* 검색 폼 스타일 */
.search-form label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.search-form .form-control,
.search-form .form-select {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: #0F4C5C;
    box-shadow: 0 0 0 0.2rem rgba(15, 76, 92, 0.25);
}

/* 버튼 스타일 개선 */
.btn-primary {
    background-color: #0F4C5C;
    border-color: #0F4C5C;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #1a5f6e;
    border-color: #1a5f6e;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

/* 알림 메시지 스타일 */
.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 0.375rem;
}

.alert-info i {
    font-size: 1.2rem;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .patent-page-header h1 {
        font-size: 1.5rem;
    }
    
    .patent-search-card .card-body {
        padding: 1rem;
    }
    
    .patent-item-card .card-body {
        padding: 1rem;
    }
    
    .patent-item-card .card-title {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* 카드 hover 효과 개선 */
.hover-effect {
    position: relative;
    overflow: hidden;
}

.hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hover-effect:hover::before {
    left: 100%;
}

/* Stretched link 수정 */
.patent-item-card .stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* 카드 내 다른 클릭 가능 요소들의 z-index 조정 */
.patent-item-card .favorite-btn {
    position: relative;
    z-index: 2;
}

/* 로딩 상태 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0F4C5C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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