/**
 * Pinry Share Plugin Styles
 * 
 * Styles for displaying Pinry pins in WordPress
 */

/* Container - Ultra Minimal */
.pinry-share-container {
    margin: 0;
    padding: 0;
    clear: both;
    width: 100%;
}

/* Single Column Layout - Just Images */
.pinry-layout-grid,
.pinry-layout-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Individual Pin - Ultra Minimal */
.pinry-pin {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: opacity 0.2s ease;
    margin: 0;
    padding: 0 0 64px 0;
}

.pinry-pin:hover {
    opacity: 0.9;
    transform: none;
    box-shadow: none;
}

/* Pin Image - Natural Aspect Ratio */
.pinry-pin-image {
    position: relative;
    overflow: visible;
    background: transparent;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
}

.pinry-pin-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    display: block;
    margin: 0 auto;
    transition: opacity 0.2s ease;
    border: none;
    border-radius: 0;
    object-fit: contain;
}

.pinry-pin:hover .pinry-pin-image img {
    opacity: 0.9;
    transform: none;
}

.pinry-pin-image a {
    display: block;
    text-decoration: none;
    width: 100%;
}

/* Pin Source - Show domain */
.pinry-source {
    text-align: center;
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Pin Details - HIDDEN */
.pinry-pin-details {
    display: none !important;
}

/* Pin Title - HIDDEN */
.pinry-pin-title {
    display: none !important;
}

/* Pin Description - HIDDEN */
.pinry-pin-description {
    display: none !important;
}

/* Pin Meta - HIDDEN */
.pinry-pin-meta {
    display: none !important;
}

/* Pin Tags - HIDDEN */
.pinry-pin-tags {
    display: none !important;
}

/* No Pins Message */
.pinry-no-pins {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Responsive Design - Single Column */
@media (max-width: 768px) {
    .pinry-pin {
        padding: 0 0 48px 0;
    }
}

@media (max-width: 480px) {
    .pinry-pin {
        padding: 0 0 32px 0;
    }
}

/* Loading State */
.pinry-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.pinry-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: pinry-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes pinry-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.pinry-error {
    background: #fff2f2;
    border: 1px solid #ffcccb;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    color: #d63384;
}

/* Accessibility */
.pinry-pin:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Widget Styles */
.pinry-widget-container {
    margin: 0;
}

.pinry-widget-pin {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pinry-widget-pin:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pinry-widget-pin-image {
    margin-bottom: 8px;
    overflow: hidden;
    border-radius: 4px;
}

.pinry-widget-pin-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}

.pinry-widget-pin-image:hover img {
    transform: scale(1.02);
}

.pinry-widget-pin-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

.pinry-widget-pin-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pinry-widget-pin-title a:hover {
    color: #0073aa;
}

.pinry-widget-pin-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.pinry-widget-pin-meta {
    font-size: 11px;
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pinry-widget-user {
    font-weight: 500;
}

.pinry-widget-date {
    font-style: italic;
}

/* Widget Layout - Also Single Column */
.pinry-widget-container.pinry-layout-grid,
.pinry-widget-container.pinry-layout-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pinry-widget-container .pinry-widget-pin {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pinry-pin {

        color: #e0e0e0;
    }
    
    .pinry-pin-title a {
        color: #e0e0e0;
    }
    
    .pinry-pin-title a:hover {
        color: #4a9eff;
    }
    
    .pinry-pin-description {
        color: #b0b0b0;
    }
    
    .pinry-pin-meta {
        color: #888;
    }
    
    .pinry-label {
        color: #ccc;
    }
    
    .pinry-tag {
        color: #b0b0b0;
    }
    
    .pinry-pin-image {
    }
    
    .pinry-widget-pin {
        border-bottom-color: #404040;
    }
    
    .pinry-widget-pin-title a {
        color: #e0e0e0;
    }
    
    .pinry-widget-pin-title a:hover {
        color: #4a9eff;
    }
    
    .pinry-widget-pin-description {
        color: #b0b0b0;
    }
    
    .pinry-widget-pin-meta {
        color: #888;
    }
    
    .pinry-source {
        color: #999;
    }
}
