/**
 * Gift Lists Styling
 * Path: assets/gift-lists.css
 */

/* General Styles */
.woocommerce-gift-lists {
    padding: 20px 0;
}

.woocommerce-gift-lists h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

/* Create List Section */
.gift-list-create-section {
    margin-bottom: 30px;
}

#create-list-form {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#create-list-form h3 {
    margin-top: 0;
    color: #333;
}

#create-list-form input[type="text"],
#create-list-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#create-list-form textarea {
    resize: vertical;
    font-family: inherit;
}

/* Gift List Cards */
.gift-list-card {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.gift-list-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.gift-list-card h3 {
    color: #333;
    font-size: 1.5em;
}

.gift-list-stats ul {
    font-size: 14px;
}

.gift-list-stats li {
    padding: 5px 0;
}

/* Sharing Section */
.gift-list-sharing input[type="text"] {
    font-size: 13px;
    font-family: monospace;
    padding: 10px;
}

.copy-list-link {
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

/* List Items Table */
.list-items-container table {
    width: 100%;
    border-collapse: collapse;
}

.list-items-container th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.list-items-container td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.list-items-container td img {
    max-width: 60px;
    height: auto;
    border-radius: 4px;
}

/* Buttons */
.button.small {
    padding: 8px 15px;
    font-size: 13px;
}

.delete-gift-list {
    background: #dc3232;
    color: white;
    border: none;
}

.delete-gift-list:hover {
    background: #a00;
}

/* Add to Gift List Button (Product Page) */
.gift-list-actions {
    margin-top: 15px;
}

.add-to-gift-list {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
}

.add-to-gift-list:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Modal */
#select-list-modal {
    animation: fadeIn 0.3s ease;
}

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

#select-list-modal > div {
    animation: slideUp 0.3s ease;
}

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

#lists-selection button {
    transition: all 0.2s ease;
}

#lists-selection button:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

/* Public List View */
.woocommerce-gift-list-public {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.gift-list-product-card {
    transition: all 0.3s ease;
}

.gift-list-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.gift-list-product-card .product-image {
    overflow: hidden;
    background: #f5f5f5;
}

.gift-list-product-card .product-image img {
    transition: transform 0.3s ease;
}

.gift-list-product-card:hover .product-image img {
    transform: scale(1.05);
}

.gift-list-product-card .button {
    transition: all 0.2s ease;
}

.gift-list-product-card .button:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce-gift-lists h2 {
        font-size: 1.5em;
    }
    
    .gift-list-card {
        padding: 15px !important;
    }
    
    .gift-list-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .gift-list-header > div:last-child {
        margin-top: 15px;
        width: 100%;
    }
    
    .gift-list-header .delete-gift-list {
        width: 100%;
    }
    
    .gift-list-sharing {
        flex-direction: column;
    }
    
    .gift-list-sharing input,
    .gift-list-sharing button {
        width: 100% !important;
    }
    
    .list-items-container {
        overflow-x: auto;
    }
    
    .list-items-container table {
        min-width: 600px;
    }
    
    #select-list-modal > div {
        width: 95% !important;
        padding: 20px !important;
    }
}

/* Loading States */
.button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success/Error Messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.woocommerce-message {
    background: #e7f7e7;
    color: #2e7d32;
    border-left: 4px solid #46b450;
}

.woocommerce-error {
    background: #ffe7e7;
    color: #c62828;
    border-left: 4px solid #dc3232;
}

.woocommerce-info {
    background: #e7f3ff;
    color: #1976d2;
    border-left: 4px solid #2196F3;
}

/* Print Styles */
@media print {
    .gift-list-actions,
    .delete-gift-list,
    .copy-list-link,
    .add-to-gift-list,
    .button {
        display: none !important;
    }
}