/* Ross Software WooCommerce Addon - Frontend Styles */

/* Software Product Type Indicators */
.software-type-indicator {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 5px;
    vertical-align: middle;
}

.software-type-indicator.subscription {
    background: #e3f2fd;
    color: #1976d2;
}

.software-type-indicator.license {
    background: #e8f5e8;
    color: #2e7d32;
}

/* Software Product Badges */
.software-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 5px 0;
}

.software-badge.subscription {
    background: #1976d2;
    color: white;
}

.software-badge.license {
    background: #2e7d32;
    color: white;
}

/* Product Features List */
.software-features {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.software-features li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: #666;
    font-size: 14px;
}

.software-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #2e7d32;
    font-weight: bold;
}

/* Software Product Card Enhancements */
.woocommerce ul.products li.product.software-product {
    position: relative;
}

.woocommerce ul.products li.product.software-product::after {
    content: "SOFTWARE";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #1976d2;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Add to Cart Button Customization */
.single-product .woocommerce-variation-add-to-cart .button,
.single-product .cart .button {
    background: #1976d2;
    border-color: #1976d2;
}

.single-product .woocommerce-variation-add-to-cart .button:hover,
.single-product .cart .button:hover {
    background: #1565c0;
    border-color: #1565c0;
}

/* Software Product Meta */
.software-product-meta {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
}

.software-product-meta h3 {
    margin: 0 0 10px 0;
    color: #1976d2;
    font-size: 16px;
    font-weight: 600;
}

.software-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.software-meta-item:last-child {
    border-bottom: none;
}

.software-meta-label {
    font-weight: 600;
    color: #495057;
}

.software-meta-value {
    color: #6c757d;
}

/* License Management Styles */
.rswa-licenses-container {
    max-width: 800px;
    margin: 0 auto;
}

.rswa-license-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.rswa-license-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.rswa-license-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rswa-license-header h3 {
    margin: 0;
    color: #1976d2;
    font-size: 18px;
    font-weight: 600;
}

.rswa-license-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rswa-license-type.license {
    background: #e8f5e8;
    color: #2e7d32;
}

.rswa-license-type.subscription {
    background: #e3f2fd;
    color: #1976d2;
}

.rswa-license-details {
    padding: 20px;
}

.rswa-license-info {
    margin-bottom: 12px;
    font-size: 14px;
}

.rswa-license-info strong {
    color: #333;
    margin-right: 8px;
}

.rswa-license-key-container {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #1976d2;
}

.rswa-license-key {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.rswa-license-key code {
    flex: 1;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
}

.rswa-copy-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.rswa-copy-btn:hover {
    background: #1565c0;
}

.rswa-copy-btn-small {
    background: #1976d2;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    margin-left: 8px;
}

.rswa-status-active {
    color: #2e7d32;
    font-weight: 600;
}

.rswa-subscription-active {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rswa-downloads {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.rswa-download-link {
    display: inline-block;
    background: #1976d2;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    margin: 5px 10px 5px 0;
    font-size: 13px;
    transition: background 0.2s ease;
}

.rswa-download-link:hover {
    background: #1565c0;
    color: white;
    text-decoration: none;
}

.rswa-download-license {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    border-radius: 8px;
    border-left: 4px solid #1976d2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rswa-license-header-small {
    margin-bottom: 10px;
}

.rswa-license-header-small strong {
    color: #1976d2;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rswa-license-key-display {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rswa-license-key-display code {
    flex: 1;
    background: white;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rswa-license-note {
    margin: 0;
    font-size: 12px;
    color: #666;
    font-style: italic;
    line-height: 1.4;
}

/* Thank You Page License Section */
.rswa-thankyou-licenses {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e3f2fd;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.1);
}

.rswa-thankyou-licenses h2 {
    color: #1976d2;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rswa-licenses-intro {
    font-size: 16px;
    color: #333;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.rswa-thankyou-license-card {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.rswa-thankyou-license-card:hover {
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.1);
    border-color: #1976d2;
}

.rswa-thankyou-license-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
}

.rswa-thankyou-license-header h3 {
    margin: 0;
    color: #1976d2;
    font-size: 20px;
    font-weight: 600;
}

.rswa-thankyou-license-type {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rswa-thankyou-license-type.subscription {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

.rswa-thankyou-license-type.license {
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: white;
}

.rswa-thankyou-license-key-container {
    margin-bottom: 20px;
}

.rswa-thankyou-license-key-container label {
    display: block;
    margin-bottom: 8px;
    color: #1976d2;
    font-size: 16px;
}

.rswa-thankyou-license-key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.rswa-license-key-code {
    flex: 1;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    word-break: break-all;
    color: #1976d2;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rswa-thankyou-copy-btn {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.2);
}

.rswa-thankyou-copy-btn:hover {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(25, 118, 210, 0.3);
}

.rswa-thankyou-license-note {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rswa-thankyou-subscription-info {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
    margin-bottom: 20px;
}

.rswa-subscription-message {
    margin: 0;
    color: #2e7d32;
    line-height: 1.6;
}

.rswa-thankyou-next-steps {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

.rswa-thankyou-next-steps h4 {
    margin: 0 0 15px 0;
    color: #e65100;
    font-size: 16px;
    font-weight: 600;
}

.rswa-thankyou-next-steps ol {
    margin: 0;
    padding-left: 20px;
}

.rswa-thankyou-next-steps li {
    margin-bottom: 8px;
    color: #333;
    line-height: 1.5;
}

.rswa-thankyou-support {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1f5fe 100%);
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
    text-align: center;
}

.rswa-thankyou-support p {
    margin: 0 0 10px 0;
    color: #333;
}

.rswa-thankyou-support p:last-child {
    margin-bottom: 0;
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rswa-thankyou-license-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rswa-thankyou-license-key-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .rswa-thankyou-copy-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Order Details License Section */
.rswa-order-licenses {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.rswa-order-licenses h2 {
    color: #1976d2;
    font-size: 20px;
    margin-bottom: 15px;
}

.rswa-order-licenses table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
}

.rswa-order-licenses th,
.rswa-order-licenses td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.rswa-order-licenses th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.rswa-order-licenses code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 13px;
}

/* Email Styles */
.rswa-email-licenses {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .software-type-indicator {
        display: block;
        margin: 5px 0 0 0;
        text-align: center;
    }
    
    .software-badge {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
    
    .software-meta-item {
        flex-direction: column;
        gap: 2px;
    }
    
    .software-meta-label {
        font-size: 14px;
    }
    
    .software-meta-value {
        font-size: 13px;
    }
    
    .rswa-license-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .rswa-license-key {
        flex-direction: column;
        gap: 8px;
    }
    
    .rswa-license-key code {
        word-break: break-all;
    }
    
    .rswa-order-licenses table {
        font-size: 14px;
    }
    
    .rswa-order-licenses th,
    .rswa-order-licenses td {
        padding: 8px;
    }
}

/* Software Key Column Styles */
.rswa-software-key-column {
    padding: 8px 0;
}

.rswa-license-key-display-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rswa-license-key-display-compact code {
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    border: 1px solid #e0e0e0;
    word-break: break-all;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rswa-copy-btn-compact {
    background: #1976d2;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    min-width: 50px;
}

.rswa-copy-btn-compact:hover {
    background: #1565c0;
}

.rswa-copy-btn-compact:active {
    background: #0d47a1;
}

.rswa-no-software-key {
    color: #999;
    font-style: italic;
}

/* Downloads table specific styles */
.woocommerce-account .woocommerce-downloads-table .rswa-software-key-column {
    vertical-align: top;
}

.woocommerce-account .woocommerce-downloads-table .rswa-license-key-display-compact code {
    max-width: 180px;
    font-size: 11px;
}

/* Responsive adjustments for software key column */
@media (max-width: 768px) {
    .rswa-license-key-display-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .rswa-license-key-display-compact code {
        max-width: 100%;
        white-space: normal;
        word-break: break-all;
    }
    
    .rswa-copy-btn-compact {
        align-self: flex-start;
    }
}

/* Test Download Demonstration Styles */
.rswa-test-download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin: 20px 0;
}

.rswa-test-download-grid > div {
    padding: 8px;
    border-right: 1px solid #f0f0f0;
}

.rswa-test-download-grid > div:last-child {
    border-right: none;
}

.rswa-test-download-header {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.rswa-test-download-demo {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.rswa-test-download-demo h3 {
    margin: 0 0 15px 0;
    color: #1976d2;
    font-size: 18px;
}

.rswa-test-download-demo p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
}

.rswa-test-download-demo .demo-note {
    margin: 15px 0 0 0;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Revoked License Styles */
.rswa-license-revoked {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
}

.rswa-license-revoked .rswa-license-header-small strong {
    color: #c62828;
}

.rswa-license-revoked .rswa-license-note {
    color: #c62828;
    font-style: italic;
}

.rswa-license-revoked-badge {
    background: #ffebee;
    color: #c62828;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #ffcdd2;
}
