/* MAIN UI */

.riz-ui{
    max-width:1100px;
    margin:0px auto;
    padding: 20px 40px;
    text-align:center;
    background:#fff;
}

/* SEARCH BAR */

.riz-search-wrap{
    max-width:860px;
    margin:0 auto;
    display:flex;
    align-items:center;
    gap:12px;
}

.riz-search{
    flex:1;
}

.riz-search:focus-within{
    border-color:#c40000;
    box-shadow:0 0 0 3px rgba(196,0,0,.15);
}

.riz-search input{
    flex:1;
    border:none;
    outline:none;
    font-size:16px;
    padding:12px;
}

.riz-input-wrap{
    display:flex;
    align-items:center;
    background:#fafafa;
    border:1px solid #e5e7eb;
    padding:0px;
}

.riz-input-wrap input{
    flex:1;
    border:none;
    outline:none;
    font-size:16px;
    padding:12px;
    background:transparent;
}

.is-paste{
    display:flex;
    align-items:center;
    justify-content:center;
    width:36px;
    height:36px;
    cursor:pointer;
    flex-shrink:0;
}

.lt-icon{
    width:24px;
    height:24px;
    display:block;
}

.img-paste{
    background:url(../assets/imgs/paste.png) no-repeat center;
}

.img-trash{
    background:url(../assets/imgs/delete.png) no-repeat center;
}

.is-paste:hover, .is-paste:focus, .is-paste:active {
    background: #fff;
}

/* Download button */
.riz-download-btn{
    padding:14px 32px;
    background:linear-gradient(135deg,#a600c4,#ff2d2d);
    color:#fff;
    border:none;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .3s ease;
}

.riz-download-btn:hover,
.riz-download-btn:focus{
    background: linear-gradient(135deg, #c400e6, #ff4d4d);
}

/* STATUS MESSAGE */

.riz-status{ 
    margin-top:18px !important;
    font-size: 16px; 
    padding:14px 18px; 
    border-radius:0px; 
    max-width:860px; 
    font-weight:600; 
    margin:10px auto !important; 
    display:none; 
    opacity:0; 
    transition:opacity .35s ease, transform .35s ease; 
    transform:translateY(-5px); 
}

.riz-status.show{
    opacity:1;
    transform:translateY(0);
}

.riz-status.info{background:#cff4fc;color:#055164;}
.riz-status.success{background:#e6f9ee;color:#0f7a3b;}
.riz-status.error{background:#fde8e8;color:#b00000;}
.riz-status.warning{background:#fff6d6;color:#9a7b00;}

/* RESULT SECTION */

#riz-result-wrapper{display:none;}

.riz-result{
    display:flex;
    flex-wrap:wrap;
    background:#fff;
    border:1px solid #ededed;
    border-radius:16px;
    box-shadow:0 10px 30px rgba(0,0,0,.06);
    overflow:hidden;
    margin-bottom:2em;
}

.riz-left,
.riz-right{
    flex:1 1 0;
    min-width:300px;
    padding:25px;
    box-sizing:border-box;
}

@media(min-width:769px){
    .riz-left{border-right:1px solid #eee;}
}

/* Headings */
.title-header{
    font-size:1.2rem;
    font-weight:700;
    text-transform:uppercase;
    margin-bottom:10px;
    text-align: center;
}

.riz-divider{
    border:none;
    height:1px;
    background:#ddd;
    margin:12px 0 18px !important;
}

/* Thumbnail */
.riz-left img{
    width:100%;
    max-width:280px;
    margin:0 auto;
    display:block;
    border-radius:12px;
}

#riz-title-text {
    margin:10px;
}

/* VIDEO META */
.riz-video-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
}

.riz-author-img {
    width: 55px;
    height: 55px;
    border-radius: 50%; /* Circle shape */
    border: 2px solid #eee;
    object-fit: cover;
}

.riz-username {
    color: #171717; /* TikTok Pink Color */
    font-size: 18px;
}

.riz-video-duration {
    font-size: 18px;
    color: #f9a600;
}

/* Stats Wrapper */
.riz-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin: 16px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    text-align: center;
}

/* Individual Stat - Column layout */
.riz-stats span {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    flex: 1;
    min-width: 65px;
}

/* Icons Size */
.riz-stats img {
    width: 20px !important;
    height: 20px !important;
    display: block;
    margin: 0 auto;
    opacity: 0.8;
}

/* Numbers (Counting) */
.riz-stats span b {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}
/* Tooltip adjustment */
.riz-stats span::after {
    bottom: 110%;
}

@media(max-width: 480px) {
    .riz-stats {
        display: grid; 
        grid-template-columns: repeat(3, 1fr); 
        gap: 20px 0;
        justify-items: center;
    }
    
    .riz-stats span {
        width: 100%;
        min-width: unset;
    }
    .riz-stats span b {
        font-size: 11px;
    }
}

/* Tablet (iPad Mini) Specific Adjustment */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .riz-stats {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: max-content !important;
        max-width: 100% !important;
        margin: 16px auto !important;
        gap: 0px !important; 
        justify-content: center;
    }

    .riz-stats span {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        padding: 0 5px;
    }
}

/* Tooltip box */
.riz-stats span::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 118%; /* Thora neeche kiya */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Start position thori neeche */
    background: #111;
    color: #fff;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    pointer-events: none;
    z-index: 99;
}

/* Tooltip Arrow */
.riz-stats span::before {
    content: "";
    position: absolute;
    bottom: 92%; /* Box ke bilkul neechay set karne ke liye */
    left: 50%;
    transform: translateX(-50%) translateY(10px); /* Box ke sath hi move hoga */
    border: 6px solid transparent;
    border-top-color: #111;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out;
    z-index: 99;
}

/* Show on hover - Dono ek sath oopar ayenge */
.riz-stats span:hover::after,
.riz-stats span:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* FORMAT + ACTIONS */
.riz-format-wrap{
    margin-bottom:20px;
}

#riz-format{
    width:100%;
    padding:12px;
    margin-top: 10px;
    font-size:15px;
	font-weight: 600;
    border:1px solid #a9a9a9;;
}

#riz-format.needs-attention{
    border-color:#f00d56;
    box-shadow:0 0 0 3px rgba(240,13,86,.25);
    animation: rizPulse 1.2s ease infinite;
}

@keyframes rizPulse{
    0%   { box-shadow:0 0 0 0 rgba(240,13,86,.35); }
    70%  { box-shadow:0 0 0 6px rgba(240,13,86,0); }
    100% { box-shadow:0 0 0 0 rgba(240,13,86,0); }
}

.riz-actions{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:14px;
}

/* Download Now */
#riz-download-main{
    width:100%;
    padding:16px;
    font-size:16px;
    font-weight:700;
    background: linear-gradient(94deg, #00dcd5, #b10039);
    color:#fff;
    border:none;
    cursor:pointer;
    opacity: 1;
    transition:opacity .25s ease;
}

#riz-download-main:disabled{
    opacity:.35;
    cursor:not-allowed;
}

#riz-download-main:enabled{
    opacity:1;
}

#riz-download-main:hover:enabled{
    opacity:.9;
}

/* Download Another */
.riz-reset-btn{
    width:100%;
    padding:14px;
    font-size:15px;
    font-weight: 700;
    background: #00d084;
    color:#fff;
    border:none;
    cursor:pointer;
}

.riz-reset-btn:hover{
    opacity:.9;
	background: #07a96e;
}

#riz-stats img{
    width:16px;
    height:16px;
    display:block;
}

.tost{
    text-align: center;
    font-size: 14px;
    margin: 1em;
    color:#898989;
}

/* MOBILE */

@media(max-width:768px){
    .riz-ui{padding:0;}
    .riz-search-wrap{flex-direction:column;}
    .riz-download-btn{width:100%;}
    .riz-left,.riz-right{padding:15px;}
    #riz-stats{font-size:12px;}

    .riz-status{
    margin-top:18px !important;
    font-size: 14px;
    border-radius: 0px;
	}
    
    .riz-search{
    width:100%;
    padding:0;
    }

    .tost {
    text-align: center;
    font-size: 11px !important;
    margin: 1em 0 1em 0 !important;
	}
}

.riz-status:has(.riz-pulse-dots) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.riz-pulse-dots {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 12px 0;
}
.riz-pulse-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    animation: rizPulse 1.2s ease-in-out infinite;
}
.riz-dot-1 { background: #EE1D52; animation-delay: 0s; }
.riz-dot-2 { background: #010101; animation-delay: 0.2s; }
.riz-dot-3 { background: #69C9D0; animation-delay: 0.4s; }
@keyframes rizPulse {
    0%, 100% { opacity: 0.25; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

