/* SJ Collabo Campaign Styles */

/* 리셋과 기본 스타일 */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.p18 {
    padding: 20px;
}

/* 헤더 스타일 */
.common_head {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header_inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    height: 60px;
}

.head_center {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.back_btn {
    width: 24px;
    height: 24px;
}

/* 캠페인 헤더 */
.campaign-header {
    background: #fff;
    padding: 30px 20px;
    text-align: center;
    margin: -20px -20px 30px -20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.campaign-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
}

.campaign-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #e91e63;
    margin-bottom: 15px;
}

.campaign-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.campaign-highlight {
    background: #fff5f7;
    border: 2px solid #e91e63;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    text-align: center;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.1);
}

/* 폼 섹션 */
.form-section {
    margin-bottom: 25px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e91e63;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}



/* 입력 필드 스타일 */
.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-input:read-only {
    background: #f8f9fa;
    color: #666;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: #999;
    font-size: 13px;
}

.form-textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

.form-textarea::placeholder {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}

/* 파일 업로드 */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #e91e63;
    background: #fff5f7;
}

.file-upload-area.dragover {
    border-color: #e91e63;
    background: #fff5f7;
    transform: scale(1.02);
}

.file-upload-icon {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.7;
}

.file-upload-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.file-upload-sub {
    font-size: 12px;
    color: #999;
}

/* 제출 버튼 */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: #e91e63;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.submit-btn:hover {
    background: #c2185b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* 옵션 태그 */
.optional-tag {
    display: inline-block;
    background: #e9ecef;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

/* 리스트 페이지 스타일 */
.campaign-list {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.campaign-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.campaign-item:last-child {
    border-bottom: none;
}

.campaign-item:hover {
    background: #f8f9fa;
}

.campaign-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.campaign-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.campaign-item-date {
    font-size: 12px;
    color: #999;
}

.campaign-item-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 10px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.campaign-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.campaign-item-author {
    font-weight: 500;
}

.campaign-item-stats {
    display: flex;
    gap: 10px;
}

/* 상세보기 페이지 스타일 */
.campaign-view {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.campaign-view-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.campaign-view-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.campaign-view-meta {
    font-size: 14px;
    color: #666;
}

.campaign-view-content {
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.campaign-view-image {
    text-align: center;
    margin: 20px 0;
}

.campaign-view-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 반응형 */
@media (max-width: 480px) {
    .p18 {
        padding: 15px;
    }
    
    .campaign-header {
        margin: -15px -15px 25px -15px;
        padding: 25px 15px;
    }
    
    .campaign-title {
        font-size: 16px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .form-section-title {
        font-size: 15px;
    }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
    .form-input:read-only {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
    }
}

/* 랭킹 섹션 */
.ranking-section {
    margin-bottom: 40px;
    margin-top: 10px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.month-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ranking-item {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ranking-badge {
    flex-shrink: 0;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e91e63;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.story-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.story-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ccc;
}

.story-content {
    flex: 1;
}

.story-hospital {
    font-size: 14px;
    font-weight: 600;
    color: #e91e63;
    margin-bottom: 4px;
}

.story-author {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.story-preview {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.story-date {
    font-size: 11px;
    color: #999;
}

.story-likes {
    font-size: 11px;
    color: #e91e63;
    font-weight: 600;
}

/* 최신 섹션 */
.latest-section {
    margin-top: 50px;
}

/* 글쓰기 버튼 스타일 */
.write-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e91e63;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.write-btn:hover {
    background: #c2185b;
    transform: translateY(-1px);
}

.latest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.latest-item {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.latest-item:hover {
    background: #f8f9fa;
}

.story-thumbnail-small {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
}

.story-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-small {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ccc;
}

.story-info {
    flex: 1;
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.story-meta-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* #ft { display: none; } */

/* 추가 반응형 스타일 */
@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .ranking-item {
        padding: 15px;
        gap: 12px;
    }
    
    .story-thumbnail {
        width: 70px;
        height: 70px;
    }
    
    .story-thumbnail-small {
        width: 50px;
        height: 50px;
    }
} 