@import "design-tokens.less";

.page-video {
    overflow: hidden;
    .page-title {
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 7rem;
        .title {
            font-size: 3rem;
            color: #333333;
            margin-bottom: 2.6rem;
        }
        .desc {
            font-size: 1.2rem;
            color: #333333;
            margin-bottom: 7.3rem;
        }
        .filter-row {
            margin-bottom: 10rem;
            .filter {
                font-size: 1.2rem;
                color: #333333;
                margin-right: 1.2rem;
            }
            .search-input {
                margin-left: 3.2rem;
                outline: none;
                border: none;
                font-size: 1.2rem;
                color: #333333;
                padding: 0.4rem;
                border-bottom: 1px solid #9e9e9e;
                width: 18.9rem;
                &::placeholder {
                    color: #999;
                }
            }
            .search-glass {
                width: 1.48rem;
                height: 1.26rem;
                right: 0.2rem;
                bottom: 0.6rem;
                cursor: pointer;
            }
            .category-select {
                font-size: 1.2rem;
                color: #333;
                outline: none;
                border: none;
                -webkit-appearance: none;
                width: 11.959999999999999rem;
                height: 2.1rem;
                background-size: cover;
                background-repeat: no-repeat;
                background-image: url('../images/new/video/select-bg.png');
            }
        }
    }
    .video-list {
        margin-left: auto;
        margin-right: auto;
        width: 120rem;
        .video-card {
            // height: 24rem;
            padding-top: 5rem;
            padding-bottom: 5rem;
            padding-left: 5rem;
            padding-right: 5rem;
            box-shadow: 0px 0.5rem 1rem rgba(0, 0, 0, 0.1);
            margin-bottom: 5rem;
            .card-left {
                width: 57rem;
                padding-top: 0.5rem;
                .title {
                    font-size: 2.2rem;
                    color: #333333;
                    width: 37.5rem;
                    margin-bottom: 1.6rem;
                    line-height: 1;
                }
                
                .desc {
                    font-size: 1.8rem;
                    color: #333333;
                    line-height: 1.2;
                }
                .extra{
                    div{
                        font-size: 1rem;
                        color: #1f94d2;
                        border: 0.1rem solid #1f94d2;
                        border-radius: 999px;
                        padding: 0.4rem 0.8rem;
                        line-height: 0.8;
                        margin-top: 1.6rem;
                    }
                    
                }
                .button {
                    margin-top: 1.6rem;
                    display: inline-flex;
                    justify-content: center;
                    align-items: center;
                    background-color: #1f94d2;
                    border-radius: 2rem;
                    padding: 1rem 3rem;
                    font-size: 1.8rem;
                    color: white;
                    cursor: pointer;
                }
            }
            .card-right {
                width: 47rem;
                
                flex-shrink: 0;
                .bg-img{
                    object-fit: cover;
                }
                .play {
                    width: 7.4rem;
                    height: 7.4rem;
                    cursor: pointer;
                }
            }
        }
    }
    .popup {
        position: fixed;
        z-index: 9;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.52);
        .popup-content {
          background: white;
          width: 80rem;
          display: flex;
          justify-content: center;
          border-radius: 0.3rem;
          flex-direction: column;
          .popup-video-wrapper {
            padding: 1.6rem;
            border-top: 1px solid #dee2e6;
            video {
              width: 76.8rem;
              height: 43.37777777777778rem;
              object-fit: contain;
            }
          }
          .popup-title {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            .close-button {
              cursor: pointer;
              width: 4.8rem;
              height: 4.8rem;
              display: flex;
              justify-content: center;
              align-items: center;
              font-size: 2.4rem;
              opacity: 0.5;
            }
          }
        }
    }
}

/* 手机端（≤990px）：覆盖遗留超大 rem */
@media screen and (max-width: @bp-mobile) {
	.page-video {
		.page-title {
			width: 100%;
			max-width: 100%;
			padding: calc(@header-height-mobile + 2rem) 1.6rem 0;
			box-sizing: border-box;

			> .title {
				font-size: @inner-hero-title-mobile;
				line-height: 1.2;
				margin-bottom: 1rem;
				padding: 0 0.4rem;
			}

			> .desc {
				width: 100%;
				max-width: 100%;
				font-size: @inner-hero-desc-mobile;
				line-height: 1.55;
				margin-bottom: 2rem;
				padding: 0 0.4rem;
			}

			.filter-row {
				flex-direction: column;
				align-items: stretch;
				width: 100%;
				max-width: 100%;
				margin-bottom: 2.4rem;
				gap: 1.2rem;

				> .flex {
					width: 100%;
					flex-direction: column;
					align-items: stretch;
					gap: 0.6rem;
				}

				.filter {
					font-size: @form-label-mobile;
					margin-right: 0;
					margin-bottom: 0.2rem;
				}

				.category-select {
					width: 100%;
					max-width: 100%;
					height: 4.4rem;
					font-size: 1.6rem;
					padding: 0 2.4rem 0 1rem;
					box-sizing: border-box;
					background-size: 100% 100%;
					border-bottom: 1px solid #9e9e9e;
				}
			}

			.search-input-wrapper {
				width: 100%;
				margin-top: 0;

				.search-input {
					width: 100%;
					margin-left: 0;
					font-size: 1.6rem;
					min-height: 4.4rem;
					padding: 0.8rem 3.6rem 0.8rem 0.4rem;
					box-sizing: border-box;
				}

				.search-glass {
					width: 2rem;
					height: 2rem;
					right: 0.4rem;
					bottom: 50%;
					transform: translateY(50%);
				}
			}
		}

		.video-list {
			width: 100%;
			max-width: 100%;
			padding: 0 1.6rem 4rem;
			box-sizing: border-box;

			.video-card {
				flex-direction: column;
				height: auto;
				padding: 1.6rem 1.4rem;
				margin-bottom: 1.6rem;
				border-radius: 1rem;
				box-sizing: border-box;

				.card-right {
					order: 1;
					width: 100%;
					height: auto;
					aspect-ratio: 16 / 9;
					min-height: 18rem;
					border-radius: 0.8rem;
					overflow: hidden;

					.play {
						width: 5.6rem;
						height: 5.6rem;
					}
				}

				.card-left {
					order: 2;
					width: 100%;
					padding-top: 1.2rem;

					.title {
						font-size: @form-section-title-mobile;
						width: 100%;
						margin-bottom: 0.8rem;
						line-height: 1.32;
						word-break: break-word;
					}

					.desc {
						font-size: @form-label-mobile;
						width: 100%;
						line-height: 1.5;
					}

					.extra {
						margin-top: 0.8rem;
						font-size: @form-caption-mobile;
						color: #1f94d2;
						line-height: 1.4;
					}

					.button {
						display: flex;
						width: 100%;
						max-width: 100%;
						margin-top: 1.2rem;
						min-height: 4.4rem;
						padding: 1rem 1.6rem;
						font-size: @form-label-mobile;
						border-radius: 999px;
						box-sizing: border-box;
						text-align: center;
					}
				}
			}
		}

		.popup {
			z-index: 100;
			padding: 1.2rem;
			padding-bottom: ~"max(1.2rem, env(safe-area-inset-bottom, 0px))";
			box-sizing: border-box;

			.popup-content {
				width: 100%;
				max-width: 100%;
				max-height: ~"min(92vh, 100%)";
				border-radius: 1.2rem;
				overflow: hidden;

				.popup-video-wrapper {
					padding: 1.2rem;
					border-top: 1px solid #dee2e6;

					video {
						width: 100%;
						max-width: 100%;
						height: auto;
						aspect-ratio: 16 / 9;
						object-fit: contain;
					}
				}

				.popup-title .close-button {
					min-width: 4.4rem;
					min-height: 4.4rem;
				}
			}
		}
	}
}