/* License Renewal Plugin - Frontend Styles */

#lrp-license-check-container {
    background: transparent;
    margin-bottom: 20px;
}

.lrp-license-field {
    display: flex;
	align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.lrp-license-field label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

#lrp-license-input {
    width: 260px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: border-color 0.3s ease;
    background-color: #1d1d1d;
    color: #ffffff;
    cursor: text;
}

#lrp-license-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,0.3);
}

#lrp-license-input:hover {
    border-color: #0073aa;
}

#lrp-license-input::placeholder {
    color: #999;
    font-family: Arial, sans-serif;
    text-transform: none;
    letter-spacing: normal;
}

#lrp-check-license-btn {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 200px;
}

#lrp-check-license-btn:hover {
    background: #005a87;
}

#lrp-check-license-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.lrp-status-message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: bold;
    display: none;
}

.lrp-status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.lrp-status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.lrp-status-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    display: block;
}

.lrp-loading {
    color: #666;
    font-style: italic;
    padding: 10px 0;
}

.lrp-loading:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: lrp-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes lrp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media (max-width: 768px) {
    #lrp-license-input,
    #lrp-check-license-btn {
        max-width: 100%;
        width: 100%;
    }

    #lrp-license-check-container {
        padding: 15px;
    }
}

/* Integration with WooCommerce themes */
.woocommerce #lrp-license-check-container {
    margin-bottom: 20px;
}

.woocommerce .lrp-license-field label {
    color: inherit;
}

/* Button styling to match WooCommerce */
.woocommerce #lrp-check-license-btn {
    background: var(--wc-primary-color, #0073aa);
}

.woocommerce #lrp-check-license-btn:hover {
    background: var(--wc-primary-color-hover, #005a87);
}

/* Ensure proper spacing with add to cart button */
.woocommerce div.product form.cart {
    margin-top: 0;
}

.woocommerce div.product form.cart .button {
    margin-top: 10px;
}

/* Disabled cart button styles */
.single_add_to_cart_button:disabled,
.single_add_to_cart_button.disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* License renewal success button */
.single_add_to_cart_button.renewal-enabled {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Clear button hover effect */
#lrp-clear-license-btn:hover {
    background-color: #c82333 !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    #lrp-license-input {
        width: 100% !important;
    }

    #lrp-check-license-btn,
    #lrp-clear-license-btn {
        width: 100%;
    }
}


#lrp-clear-license-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    max-width: 200px;
}



@media (max-width: 768px) {
    .lrp-license-field {
        flex-direction: column;
    }

    #lrp-license-input,
    #lrp-check-license-btn,
    #lrp-clear-license-btn {
        max-width: 100%;
        width: 100%;
    }

    #lrp-license-check-container {
        padding: 15px;
    }

    .lrp-license-field > div {
        flex-direction: column !important;
        gap: 10px !important;
    }
}
