/**
 * L&M Fish Insurance Frontend Styles
 */

/* Modal Styles */
.lmfi-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.lmfi-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.lmfi-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lmfi-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #666;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.lmfi-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.lmfi-modal-header {
    padding: 30px;
    border-bottom: 2px solid #7FBA00;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    text-align: center;
}

.lmfi-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
}

.lmfi-modal-header h2 {
    color: #333;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.lmfi-modal-body {
    padding: 30px;
}

.lmfi-intro {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.6;
}

/* Plans Container */
.lmfi-plans-container {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    justify-content: center;
}

.lmfi-plan {
    flex: 1;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    background: white;
    max-width: 280px;
}

.lmfi-plan:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.lmfi-plan.selected {
    border-color: #7FBA00;
    box-shadow: 0 0 0 3px rgba(127, 186, 0, 0.1);
}

.lmfi-plan-header {
    padding: 20px;
    text-align: center;
    color: white;
}

.lmfi-plan-header.lite {
    background: linear-gradient(135deg, #87CEEB, #6BB6D6);
}

.lmfi-plan-header.standard {
    background: linear-gradient(135deg, #4A90E2, #3A7BC8);
}

.lmfi-plan-header.extra {
    background: linear-gradient(135deg, #1E3A8A, #1E40AF);
}

.lmfi-plan-header h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.lmfi-plan-header img {
    width: 60px;
    height: auto;
    filter: brightness(0) invert(1);
}

.lmfi-plan-price {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.lmfi-plan-price .currency {
    font-size: 20px;
    vertical-align: top;
    color: #666;
}

.lmfi-plan-price .amount {
    font-size: 48px;
    font-weight: bold;
    color: #333;
}

.lmfi-plan-price .period {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.lmfi-plan-price .discount {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-top: 5px;
}

.lmfi-plan-features {
    padding: 20px;
}

.lmfi-plan-features .feature {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    line-height: 1.4;
}

.lmfi-plan-features .feature:last-child {
    border-bottom: none;
}

.lmfi-select-btn, .lmfi-remove-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 20px;
    padding: 12px;
    background: #7FBA00;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.lmfi-select-btn:hover {
    background: #6FA800;
}

.lmfi-remove-btn {
    background: #dc3545;
}

.lmfi-remove-btn:hover {
    background: #c82333;
}

.lmfi-year-selector {
    padding: 20px;
    background: #f0f0f0;
}

.lmfi-years {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Documents Section */
.lmfi-documents {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.lmfi-documents h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.lmfi-doc-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lmfi-doc-link {
    display: inline-block;
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    color: #0073aa;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s;
}

.lmfi-doc-link:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Puncture Care Section */
.lmfi-puncture-care {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
}

.lmfi-puncture-care.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.lmfi-puncture-care h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.lmfi-puncture-care p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.lmfi-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.lmfi-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.lmfi-checkbox span {
    font-weight: 500;
}

/* Modal Actions */
.lmfi-modal-actions {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.lmfi-add-to-basket {
    padding: 15px 40px;
    background: #7FBA00;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.lmfi-add-to-basket:hover:not(:disabled) {
    background: #6FA800;
    transform: scale(1.05);
}

.lmfi-add-to-basket:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.lmfi-no-thanks {
    display: block;
    margin-top: 15px;
    color: #666;
    text-decoration: underline;
    font-size: 14px;
}

.lmfi-no-thanks:hover {
    color: #333;
}

/* Tax Notice */
.lmfi-tax-notice {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin: 15px 0;
    font-style: italic;
}

/* Cart Insurance Box */
.lmfi-cart-insurance {
    margin: 20px 0;
    padding: 20px;
    background: #f0f9ff;
    border: 2px solid #7FBA00;
    border-radius: 8px;
}

.lmfi-insurance-box {
    position: relative;
}

.lmfi-insurance-box.has-insurance {
    background: #e8f5e9;
}

.lmfi-cart-logo {
    width: 150px;
    height: auto;
    margin-bottom: 15px;
}

.lmfi-cart-insurance h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 15px;
}

.lmfi-current-selection {
    background: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.lmfi-selected-info {
    font-size: 14px;
    margin-bottom: 10px;
}

.lmfi-insurance-total {
    font-size: 16px;
    color: #7FBA00;
}

.lmfi-cart-selection {
    margin-top: 15px;
}

.lmfi-cart-selection.hidden {
    display: none;
}

.lmfi-cart-plans {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 5px;
}

.lmfi-cart-plans.hidden {
    display: none;
}

.lmfi-cart-plan-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 15px;
}

.lmfi-puncture-option {
    margin-top: 10px;
}

.lmfi-remove-insurance {
    background: #dc3545;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.lmfi-remove-insurance:hover {
    background: #c82333;
}

.lmfi-view-details {
    display: inline-block;
    margin-top: 10px;
    color: #0073aa;
    text-decoration: underline;
    font-size: 14px;
}

.lmfi-view-details:hover {
    color: #005a87;
}

/* Notification Styles */
.lmfi-notice {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    max-width: 350px;
}

.lmfi-notice.lmfi-success {
    border-left: 4px solid #4CAF50;
}

.lmfi-notice.lmfi-error {
    border-left: 4px solid #f44336;
}

.lmfi-notice a {
    color: #0073aa;
    text-decoration: underline;
    margin-left: 10px;
}

/* Body Modal Open State */
body.lmfi-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lmfi-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .lmfi-plans-container {
        flex-direction: column;
        align-items: center;
    }
    
    .lmfi-plan {
        width: 100%;
        max-width: 350px;
        margin-bottom: 20px;
    }
    
    .lmfi-modal-header {
        padding: 20px;
    }
    
    .lmfi-modal-header h2 {
        font-size: 18px;
    }
    
    .lmfi-modal-body {
        padding: 20px;
    }
    
    .lmfi-plan-price .amount {
        font-size: 36px;
    }
    
    .lmfi-add-to-basket {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .lmfi-modal-content {
        border-radius: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
    }
    
    .lmfi-modal-close {
        top: 10px;
        right: 10px;
    }
    
    .lmfi-doc-links {
        flex-direction: column;
    }
    
    .lmfi-doc-link {
        width: 100%;
        text-align: center;
    }
}

/* Loading States */
.lmfi-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.lmfi-loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #7FBA00;
    border-radius: 50%;
    border-top-color: transparent;
    animation: lmfi-spin 0.8s linear infinite;
}

@keyframes lmfi-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Admin Styles */
.lmfi-settings-tabs .nav-tab-wrapper {
    margin-bottom: 20px;
}

.lmfi-settings-tabs .tab-content {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.lmfi-settings-tabs h3 {
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Print Styles */
@media print {
    .lmfi-modal,
    .lmfi-notice,
    .lmfi-cart-insurance {
        display: none !important;
    }
}