/**
 * LicenseHub Pro - Frontend Styles
 */

/* Products Grid */
.lhp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.lhp-product-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lhp-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lhp-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.lhp-product-content {
    padding: 20px;
}

.lhp-product-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.lhp-product-title a {
    color: inherit;
    text-decoration: none;
}

.lhp-product-title a:hover {
    color: #2271b1;
}

.lhp-product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.lhp-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.lhp-product-type {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.lhp-product-version {
    font-size: 13px;
    color: #888;
}

/* Single Product */
.lhp-product-single {
    max-width: 1000px;
    margin: 0 auto;
}

.lhp-product-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.lhp-product-header-image {
    flex: 0 0 300px;
}

.lhp-product-header-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lhp-product-header-content {
    flex: 1;
}

.lhp-product-header h1 {
    margin: 0 0 15px;
    font-size: 32px;
}

/* Tiers */
.lhp-tiers-section {
    margin: 40px 0;
}

.lhp-tiers-section h2 {
    margin-bottom: 20px;
}

.lhp-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.lhp-tier-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lhp-tier-card:hover {
    border-color: #2271b1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.lhp-tier-card.featured {
    border-color: #2271b1;
    position: relative;
}

.lhp-tier-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2271b1;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.lhp-tier-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.lhp-tier-description {
    color: #666;
    margin-bottom: 20px;
}

.lhp-tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
    text-align: left;
}

.lhp-tier-features li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lhp-tier-features li:last-child {
    border-bottom: none;
}

.lhp-tier-features .dashicons {
    color: #46b450;
}

.lhp-tier-cta {
    display: inline-block;
    padding: 12px 30px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.lhp-tier-cta:hover {
    background: #135e96;
    color: #fff;
}

/* Addons Section */
.lhp-addons-section {
    margin: 40px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lhp-addons-section h2 {
    margin-bottom: 20px;
}

.lhp-addons-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.lhp-addon-item {
    background: #fff;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lhp-addon-name {
    font-weight: 500;
}

.lhp-addon-included {
    font-size: 12px;
    color: #46b450;
}

.lhp-addon-separate {
    font-size: 12px;
    color: #2271b1;
}

/* Login Required Message */
.lhp-login-required {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.lhp-login-required h2 {
    margin-bottom: 15px;
}

.lhp-login-required p {
    color: #666;
    margin-bottom: 20px;
}

.lhp-login-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .lhp-product-header {
        flex-direction: column;
    }

    .lhp-product-header-image {
        flex: none;
    }

    .lhp-tiers-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.lhp-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lhp-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: lhp-modal-fade 0.3s;
}

@keyframes lhp-modal-fade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lhp-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.lhp-modal-close:hover,
.lhp-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#lhp-modal-title {
    margin-top: 0;
    padding-right: 20px;
}

/* Version Tables */
.lhp-versions-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.lhp-versions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.lhp-versions-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #eee;
    color: #555;
}

.lhp-versions-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.lhp-channel-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.lhp-channel-stable {
    background-color: #d4edda;
    color: #155724;
}

.lhp-channel-beta {
    background-color: #fff3cd;
    color: #856404;
}

.lhp-channel-alpha {
    background-color: #f8d7da;
    color: #721c24;
}

.lhp-channel-nightly {
    background-color: #e2e3e5;
    color: #383d41;
}


/* Clean Table Styles */
.lhp-account-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.lhp-account-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.lhp-account-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.lhp-account-table tr:last-child td {
    border-bottom: none;
}

.lhp-account-table tr:hover td {
    background-color: #fafafa;
}

/* License Key Display */
.lhp-license-key-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f1f3f5;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.lhp-license-key-display code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #333;
    font-size: 14px;
}

/* Copy Button */
.lhp-copy-key {
    background: none;
    border: none;
    cursor: pointer;
    color: #2271b1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.lhp-copy-key:hover {
    background-color: rgba(34, 113, 177, 0.1);
}

.lhp-copy-key.lhp-copied {
    color: #46b450;
}

/* Buttons */
.lhp-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.lhp-btn:hover {
    background: #135e96;
    color: #fff;
}

.lhp-btn-secondary {
    background: transparent;
    color: #d63638;
    border: 1px solid #d63638;
}

.lhp-btn-secondary:hover {
    background: #d63638;
    color: #fff;
}

.lhp-btn-small {
    padding: 6px 12px;
    font-size: 13px;
    background: #f0f0f1;
    color: #2c3338;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.lhp-btn-small:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;
}

/* Downloads Grid */
.lhp-downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.lhp-download-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lhp-download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.lhp-download-card h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #1d2327;
}

.lhp-download-meta {
    margin-bottom: 20px;
    font-size: 14px;
    color: #646970;
}

.lhp-download-meta span {
    display: block;
    margin-bottom: 5px;
}

.lhp-btn-download {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* Cards (General) */
.lhp-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.lhp-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
}

.lhp-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
}

.lhp-detail-row:last-child {
    border-bottom: none;
}

.lhp-detail-row label {
    font-weight: 600;
    color: #646970;
}

/* Status Badges */
.lhp-license-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.lhp-status-active {
    background-color: #e5f9e7;
    color: #2f6b34;
}

.lhp-status-expired {
    background-color: #fbeaea;
    color: #9e2323;
}

.lhp-status-revoked,
.lhp-status-suspended {
    background-color: #f0f0f1;
    color: #50575e;
}
/* Attachments List */
.lhp-attachments-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

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

.lhp-file-item {
    background: #f9f9f9; /* Fallback */
    background: var(--lhp-bg-secondary, #f9f9f9);
    border: 1px solid #eee; /* Fallback */
    border: 1px solid var(--lhp-border-color, #eee);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.lhp-file-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transform: translateY(-2px);
    border-color: #ddd;
}

.lhp-file-link {
    display: flex;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

.lhp-file-link .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #666;
    color: var(--lhp-text-light, #666);
}

.lhp-file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lhp-file-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    color: var(--lhp-text-color, #333);
    margin-bottom: 2px;
}

.lhp-file-desc {
    font-size: 12px;
    color: #666;
    color: var(--lhp-text-light, #666);
    line-height: 1.3;
    margin-bottom: 4px;
}

.lhp-file-meta {
    font-size: 11px;
    color: #999;
    color: var(--lhp-text-lighter, #999);
}

.lhp-doc-attachments {
    margin-top: 40px;
}
