/**
 * WooCommerce Product Documentation - Frontend Styles
 */

.wc-product-docs-downloads {
    margin: 20px 0;
}

.wc-product-docs-downloads h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #333;
}

.wc-product-docs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.wc-product-docs-item {
    margin: 0;
}

.wc-product-docs-download-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f7f7f7;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
}

.wc-product-docs-download-btn:hover {
    background: #2c3338;
    border-color: #2c3338;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.wc-product-docs-download-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.wc-product-docs-download-btn:hover .dashicons {
    color: #fff;
}

.wc-product-docs-filename {
    line-height: 1.4;
    word-break: break-word;
}

.wc-product-docs-filesize {
    font-size: 0.9em;
    opacity: 0.8;
    font-weight: normal;
}

/* PDF Modal Styles */
.wc-product-docs-modal {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(254, 0, 0, 0.932);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wc-product-docs-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 95%;
    max-width: 1600px;
    height: 95vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow: hidden;
}

.wc-product-docs-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.wc-product-docs-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.wc-product-docs-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.wc-product-docs-modal-close:hover {
    color: #000;
}

.wc-product-docs-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

.wc-product-docs-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.wc-product-docs-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.wc-product-docs-modal-footer .button {
    display: inline-block;
    padding: 10px 20px;
    background: #2c3338;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.wc-product-docs-modal-footer .button:hover {
    background: #000;
    color: #fff;
}

/* Prevent body scroll when modal is open */
body.wc-product-docs-modal-open {
    overflow: hidden;
}

/* Alternative list layout */
.wc-product-docs-list.list-layout {
    display: block;
}

.wc-product-docs-list.list-layout .wc-product-docs-item {
    margin-bottom: 10px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .wc-product-docs-list {
        grid-template-columns: 1fr;
    }
    
    .wc-product-docs-download-btn {
        padding: 12px 15px;
    }

    .wc-product-docs-modal-content {
        height: 95vh;
        max-width: 100%;
    }

    .wc-product-docs-modal {
        padding: 10px;
    }

    .wc-product-docs-modal-header h3 {
        font-size: 1em;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .wc-product-docs-download-btn {
        background: #2c3338;
        border-color: #3c434a;
        color: #f0f0f0;
    }
    
    .wc-product-docs-download-btn:hover {
        background: #0073aa;
        border-color: #0073aa;
        color: #fff;
    }
}
