/**
 * Frontend Styling for Digital Keys.
 *
 * Premium dark-modern aesthetics for WooCommerce My Account "My Keys" tab.
 * All classes prefixed with bck-.
 *
 * @package BCK\ProductImporter
 */

/* Container & Header styling */
.bck-my-keys-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.025);
    margin-bottom: 30px;
}

.bck-my-keys-header {
    margin-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
}

.bck-my-keys-header h2 {
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 700;
    margin: 0 0 6px 0 !important;
}

.bck-my-keys-subtitle {
    color: #64748b;
    font-size: 0.925rem;
    margin: 0;
}

/* Empty State styling */
.bck-no-keys-message {
    text-align: center;
    padding: 48px 24px;
}

.bck-no-keys-message .bck-icon-wrapper {
    width: 64px;
    height: 64px;
    background: #f1f5f9;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #64748b;
}

.bck-no-keys-message .bck-icon-wrapper .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.bck-no-keys-message h3 {
    font-size: 1.25rem;
    color: #1e293b;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.bck-no-keys-message p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0 0 24px 0;
}

.bck-shop-btn {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    text-decoration: none;
    display: inline-block;
}

.bck-shop-btn:hover {
    background-color: #2563eb !important;
    transform: translateY(-1px);
}

/* Keys Table styling */
.bck-keys-table-wrapper {
    overflow-x: auto;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #f8fafc;
}

.bck-keys-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.bck-keys-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.bck-keys-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 0.95rem;
}

.bck-keys-table tr:last-child td {
    border-bottom: none;
}

/* Product Column styling */
.bck-product-name {
    font-weight: 600;
    color: #1e293b;
    display: block;
}

/* Key Input Group styling */
.bck-key-display-group {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 4px;
    max-width: 100%;
}

.bck-key-input {
    border: none !important;
    background: transparent !important;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    font-size: 0.95rem !important;
    font-weight: 600;
    color: #0f172a !important;
    padding: 6px 10px !important;
    width: 180px;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.bck-btn-toggle, .bck-btn-copy {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    cursor: pointer;
    padding: 6px !important;
    margin: 0 !important;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: all 0.15s ease;
    box-shadow: none !important;
}

.bck-btn-toggle:hover, .bck-btn-copy:hover {
    color: #3b82f6 !important;
    background: #f1f5f9 !important;
}

.bck-btn-toggle .dashicons, .bck-btn-copy .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Link & Date styling */
.bck-order-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.bck-order-link:hover {
    text-decoration: underline;
}

.bck-col-date {
    color: #64748b;
    font-size: 0.875rem;
}

/* Order Details Keys Box */
.bck-order-keys-section {
    margin-top: 32px;
    margin-bottom: 32px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.bck-section-title {
    font-size: 1.35rem;
    color: #1e293b;
    font-weight: 700;
    margin: 0 0 4px 0 !important;
}

.bck-section-subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
}

/* Pagination */
.bck-keys-pagination {
    margin-top: 24px;
    text-align: center;
}

.bck-keys-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.bck-keys-pagination .page-numbers.current {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.bck-keys-pagination .page-numbers:hover:not(.current) {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bck-keys-table th:nth-child(3),
    .bck-keys-table td:nth-child(3) {
        display: none;
    }
    
    .bck-key-input {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .bck-keys-table th:nth-child(4),
    .bck-keys-table td:nth-child(4) {
        display: none;
    }
    
    .bck-my-keys-container,
    .bck-order-keys-section {
        padding: 16px;
    }
}

/* Activation Details styling */
.bck-activation-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
}

.bck-activation-details h4 {
    color: #1e293b;
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.bck-activation-details p {
    margin-bottom: 12px;
}

.bck-activation-details ol, .bck-activation-details ul {
    margin: 0 0 16px 20px !important;
    padding: 0 !important;
    list-style-type: decimal !important;
}

.bck-activation-details ul {
    list-style-type: disc !important;
}

.bck-activation-details li {
    margin-bottom: 8px;
    padding-left: 5px;
}

.bck-activation-details li strong {
    color: #0f172a;
}

.bck-activation-details a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.bck-activation-details a:hover {
    text-decoration: underline;
}

/* Product Video container and iframe responsiveness overrides to bypass WordPress KSES HTML filters */
.bck-product-video-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
}

.bck-product-video-container h3 {
    margin-bottom: 15px !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #2e2e33 !important;
    padding-bottom: 8px !important;
    width: 100% !important;
    max-width: 600px !important;
}

.bck-video-outer {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.bck-video-inner {
    position: relative !important;
    padding-bottom: 56.25% !important; /* 16:9 ratio */
    height: 0 !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    border: 1px solid #2e2e33 !important;
    background: #000000 !important;
}

.bck-video-inner iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
