/**
 * Advanced License Modal Styles
 * Live Shot Pro Plugin
 */

.lsp-license-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.lsp-license-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.lsp-license-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lsp-license-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lsp-license-modal-header h2 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.2 !important;
}

.lsp-license-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: color 0.2s;
}

.lsp-license-modal-close:hover {
    color: #111827;
}

.lsp-license-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Override Elementor heading styles */
.lsp-license-modal-body h1,
.lsp-license-modal-body h2,
.lsp-license-modal-body h3,
.lsp-license-modal-body h4,
.lsp-license-modal-body h5,
.lsp-license-modal-body h6 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Photo Info Section */
.lsp-license-photo-info {
    display: flex;
    gap: 16px;
    padding: 16px 24px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.lsp-license-photo-details {
    flex: 1;
}

.lsp-license-photo-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    order: 2; /* Move image to the right */
}

.lsp-license-modal-body .lsp-license-photo-info h3,
.lsp-license-photo-name h3 {
    margin: 0 0 4px 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}

.lsp-license-photo-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Search Bar */
.lsp-license-search {
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

#lsp-license-search-input {
    width: 100%;
    max-width: 400px;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    background: #ffffff;
}

#lsp-license-search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

#lsp-license-search-input::placeholder {
    color: #9ca3af;
}

/* Main Layout */
.lsp-license-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.lsp-license-options {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #ffffff;
}

.lsp-license-price-panel {
    width: 380px;
    background: #f9fafb;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
}

.lsp-license-price-sticky {
    padding: 24px;
}

.lsp-license-modal-body .lsp-license-price-sticky h3 {
    margin: 0 0 20px 0 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}

/* License Sections */
.lsp-license-section {
    margin-bottom: 28px;
    transition: opacity 0.3s;
}

.lsp-license-section.search-hidden {
    opacity: 0.2;
    pointer-events: none;
}

.lsp-license-modal-body .lsp-license-section h4 {
    margin: 0 0 16px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    line-height: 1.4 !important;
}

/* Radio and Checkbox Groups */
.lsp-license-radio-group,
.lsp-license-checkbox-group {
    display: grid;
    gap: 10px;
}

.lsp-license-radio,
.lsp-license-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #ffffff;
}

.lsp-license-radio.search-hidden,
.lsp-license-checkbox.search-hidden {
    display: none;
}

.lsp-license-radio:hover,
.lsp-license-checkbox:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.lsp-license-radio:has(input:checked),
.lsp-license-checkbox:has(input:checked) {
    border-color: #10b981;
    background: #f0fdf4;
}

.lsp-license-radio input,
.lsp-license-checkbox input {
    margin-right: 12px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.lsp-license-radio div,
.lsp-license-checkbox div {
    flex: 1;
}

.lsp-license-radio strong,
.lsp-license-checkbox strong {
    display: block;
    color: #111827;
    font-weight: 500;
}

.lsp-license-radio small,
.lsp-license-checkbox small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 2px;
}

.lsp-factor {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.lsp-license-radio.exclusive {
    border-color: #f59e0b;
    background: #fef3c7;
}

/* Summary Section */
.lsp-license-summary {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.lsp-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.lsp-summary-item:last-child {
    border-bottom: none;
}

.lsp-summary-item span {
    color: #6b7280;
    font-size: 14px;
}

.lsp-summary-item strong {
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

/* Price Calculation */
.lsp-license-price-calculation {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.lsp-license-price-calculation h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.lsp-price-formula {
    font-size: 13px;
}

.lsp-formula-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #6b7280;
}

/* Total Price */
.lsp-license-price-total {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 24px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 16px;
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.25);
    position: relative;
    overflow: hidden;
}

.lsp-license-price-total::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20%, -20%); }
}

.lsp-license-price-total > span {
    display: block;
    font-size: 13px;
    margin-bottom: 12px;
    opacity: 0.9;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lsp-license-price-total strong {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.lsp-license-price-total strong::before {
    content: '€';
    font-size: 32px;
    font-weight: 600;
    margin-right: 2px;
}

.lsp-license-price-total strong #lsp-total-price {
    font-size: 42px;
    font-weight: 700;
}

.lsp-license-note {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

/* Modal Footer */
.lsp-license-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9fafb;
}

.lsp-license-btn-cancel,
.lsp-license-btn-proceed {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.lsp-license-btn-cancel {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.lsp-license-btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.lsp-license-btn-proceed {
    background: #10b981;
    color: white;
    font-weight: 600;
}

.lsp-license-btn-proceed:hover {
    background: #059669;
}

.lsp-license-btn-proceed:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Cart Notification */
#lsp-cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100000;
    display: none;
    font-size: 15px;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .lsp-license-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }
    
    .lsp-license-layout {
        flex-direction: column;
    }
    
    .lsp-license-options {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .lsp-license-price-panel {
        width: 100%;
        border-left: none;
    }
    
    .lsp-license-modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .lsp-license-btn-cancel,
    .lsp-license-btn-proceed {
        width: 100%;
    }
}

/* Scrollbar Styling */
.lsp-license-options::-webkit-scrollbar,
.lsp-license-price-panel::-webkit-scrollbar {
    width: 6px;
}

.lsp-license-options::-webkit-scrollbar-track,
.lsp-license-price-panel::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.lsp-license-options::-webkit-scrollbar-thumb,
.lsp-license-price-panel::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.lsp-license-options::-webkit-scrollbar-thumb:hover,
.lsp-license-price-panel::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}