/**
 * FINEART Artwork Referral Links Styles
 * Styles for "Get referral link" buttons and modal
 */

/* Referral Link Button in Product List */
.fineart-get-referral-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3) !important;
    margin-left: 5px !important;
}

.fineart-get-referral-link:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.fineart-get-referral-link:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3) !important;
}

/* Modal Overlay */
.fineart-referral-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Content */
.fineart-referral-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.fineart-referral-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fineart-referral-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.fineart-referral-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.fineart-referral-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.fineart-referral-modal-body {
    padding: 25px;
}

.fineart-referral-product-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.fineart-referral-help-text {
    color: #666;
    margin: 0 0 15px 0;
    font-size: 14px;
}

/* Link Container */
.fineart-referral-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.fineart-referral-link-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.fineart-referral-link-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fineart-referral-copy-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.fineart-referral-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.fineart-referral-copy-btn:active {
    transform: translateY(0);
}

/* Success Message */
.fineart-referral-success-message {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error Message */
.fineart-referral-error {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(238, 9, 121, 0.3);
}

/* Loading State */
.fineart-referral-loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
}

.fineart-referral-loading:after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fineart-referral-modal-content {
        width: 95%;
        margin: 20px;
    }

    .fineart-referral-link-container {
        flex-direction: column;
    }

    .fineart-referral-copy-btn {
        width: 100%;
    }

    .fineart-get-referral-link {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

/* Compatibility with vendor dashboard themes */
.mvx-products .fineart-get-referral-link,
.wcfmmp-products .fineart-get-referral-link {
    margin-top: 5px !important;
}

/* Table cell adjustments */
td .fineart-get-referral-link {
    vertical-align: middle !important;
}

/* Special handling for MVX custom flexbox template */
#product_table tbody tr {
    position: relative;
}

#product_table td.fineart-referral-cell {
    display: block !important;
    padding: 5px !important;
    margin-left: auto;
}

#product_table td.edit .fineart-get-referral-link {
    display: inline-block !important;
    margin-left: 10px;
}

/* Make button visible in edit cell even if edit cell is hidden */
#product_table td.edit {
    display: block !important;
}

/* Compact button for MVX template */
#product_table .fineart-get-referral-link {
    padding: 8px 12px !important;
    font-size: 16px !important;
    min-width: 40px;
    text-align: center;
}
