/**handles:soc-frontend**/
/* Container on page (Compact Box) */
.soc-catalogue-container {
    position: relative;
    max-width: 550px;
    margin: 25px auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #1a252f;
    box-shadow: 0 4px 15px rgba(0,0,0,.15);
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

/* Expired Badge */
.soc-expired-badge {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    flex-wrap: wrap;
}

.soc-expired-badge small {
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.9;
}

/* Toolbar */
.soc-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #2c3e50;
    color: #fff;
    gap: 10px;
    flex-wrap: wrap;
}

.soc-toolbar-left, .soc-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.soc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: background .2s, transform .1s;
    padding: 0;
}

.soc-btn:hover { background: rgba(255,255,255,.3); }
.soc-btn:active { transform: scale(0.95); }
.soc-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.soc-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.soc-page-info {
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.soc-zoom-level {
    font-size: 12px;
    min-width: 40px;
    text-align: center;
    opacity: 0.85;
}

/* Compact Wrapper on Post Page */
.soc-pdf-viewer-wrapper {
    position: relative;
    max-height: 420px;
    height: 420px;
    overflow: hidden;
    background: #34495e;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Click-to-Expand Overlay */
.soc-click-to-expand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    transition: background 0.3s ease;
}

.soc-click-to-expand-overlay:hover {
    background: rgba(0, 0, 0, 0.45);
}

.soc-expand-trigger-btn {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,.3);
    transition: transform 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.soc-expand-trigger-btn:hover {
    background: #219653;
    transform: scale(1.05);
}

/* Canvas styling */
.soc-pdf-canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    background: #fff;
}

/* Loading */
.soc-pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 15;
}

.soc-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border: 4px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: soc-spin 0.8s linear infinite;
}

@keyframes soc-spin { to { transform: rotate(360deg); } }

/* Footer Bar */
.soc-pdf-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.soc-open-modal-text-btn {
    background: none;
    border: none;
    color: #2980b9;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
}

.soc-open-modal-text-btn:hover { text-decoration: underline; color: #1f618d; }

.soc-security-notice { color: #666; font-size: 12px; }

/* Hidden Close Button by default */
.soc-close-fullscreen-btn {
    display: none;
}

/* ====================================
   FULLSCREEN MODAL MODE (Expanded)
   ==================================== */
.soc-catalogue-container.soc-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    z-index: 999999 !important;
    background: #111;
    display: flex;
    flex-direction: column;
}

.soc-fullscreen .soc-click-to-expand-overlay {
    display: none !important;
}

.soc-fullscreen .soc-pdf-toolbar {
    padding: 12px 20px;
    background: #1a252f;
}

.soc-fullscreen .soc-pdf-viewer-wrapper {
    flex: 1;
    max-height: none !important;
    height: calc(100vh - 110px) !important;
    overflow: auto;
    background: #222;
    cursor: default;
    padding: 20px 0;
}

.soc-fullscreen .soc-pdf-canvas {
    max-height: 92vh;
}

.soc-fullscreen .soc-close-fullscreen-btn {
    display: block;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1000000;
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.soc-fullscreen .soc-close-fullscreen-btn:hover {
    background: #c0392b;
}

/* Print protection */
@media print {
    .soc-catalogue-container { display: none !important; }
}