/**
 * ===================================================================
 * SF Lecture One 테마 - URL 미디어 탭 전용 스타일
 * ===================================================================
 *
 * 이 파일은 미디어 라이브러리의 'URL미디어' 탭 내부의
 * 2단 레이아웃, 그리드 뷰, 상세 정보 패널의 스타일을 정의합니다.
 *
 * 로드 위치: admin/sf-url-media-page.php
 */

/* 전체 레이아웃 */
#sf-url-media-importer {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    background-color: #f0f0f1; /* 워드프레스 기본 배경색 */
}

.sf-lto-media-controls {
    padding: 16px;
    border-bottom: 1px solid #ddd;
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: #fff;
    flex-shrink: 0;
}

.sf-lto-media-main {
    display: flex;
    flex-grow: 1;
    min-height: 0; /* flex 자식 요소의 높이 문제 해결 */
    border-bottom: 1px solid #ddd;
}

.sf-lto-media-footer {
    padding: 16px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    text-align: right;
    flex-shrink: 0;
}

/* 왼쪽: 그리드 컨테이너 */
.sf-lto-media-grid-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
}

.sf-lto-media-grid-wrapper .initial-message {
    color: #666;
    text-align: center;
    margin-top: 20px;
}

.sf-lto-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sf-lto-media-item {
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07);
}

.sf-lto-media-item.selected {
    border-color: #007cba; /* 워드프레스 기본 파란색 */
    box-shadow: 0 0 0 1px #007cba;
}

.sf-lto-media-item:hover {
    border-color: #999;
}

.sf-lto-media-item__thumbnail {
    width: 100%;
    height: 120px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #eee;
}

.sf-lto-media-item__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sf-lto-media-item__filename {
    font-size: 12px;
    padding: 5px;
    text-align: center;
    word-break: break-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #444;
}


/* 오른쪽: 상세 정보 패널 */
.sf-lto-media-details-wrapper {
    width: 300px;
    flex-shrink: 0;
    border-left: 1px solid #ddd;
    background: #fff;
    overflow-y: auto;
    display: none; /* 기본 숨김 */
}

.sf-lto-media-details-wrapper.is-visible {
    display: block; /* JS로 제어 */
}

.sf-lto-media-details-wrapper h2 {
    font-size: 14px;
    padding: 0 16px;
    margin: 16px 0;
    font-weight: 600;
}

.details-inner {
    padding: 0 16px 16px;
}

.details-inner .thumbnail-wrapper {
    margin-bottom: 8px;
    border: 1px solid #ddd;
}

.details-inner .thumbnail-wrapper img {
    max-width: 100%;
    height: auto;
    display: block;
}

.details-inner .filename {
    font-weight: 600;
    margin: 0 0 4px;
    word-break: break-all;
}

.details-inner .dimensions,
.details-inner .filesize {
    font-size: 12px;
    color: #666;
    margin: 0 0 12px;
}

.details-inner .setting {
    display: block;
    margin-bottom: 12px;
}

.details-inner .setting span {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
}

.details-inner .setting input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
}