/**
 * IYG Share CSS
 *
 * Styles for social sharing functionality
 *
 * @package IYG
 * @since 1.0.0
 */

/* Social Sharing Section */
.iyg-social-share {
    margin: 20px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.iyg-social-share h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.iyg-social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Layout Variations */
.iyg-layout-vertical .iyg-social-buttons {
    flex-direction: column;
    align-items: flex-start;
}

.iyg-layout-horizontal .iyg-social-buttons {
    flex-direction: row;
    flex-wrap: wrap;
}

.iyg-layout-compact {
    padding: 10px;
    margin: 10px 0;
}

.iyg-layout-compact h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.iyg-layout-compact .iyg-social-buttons {
    gap: 5px;
}

/* Size Variations */
.iyg-size-small .iyg-social-btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: 80px;
}

.iyg-size-small .iyg-social-btn .dashicons {
    font-size: 14px;
}

.iyg-size-large .iyg-social-btn {
    padding: 15px 25px;
    font-size: 16px;
    min-width: 150px;
}

.iyg-size-large .iyg-social-btn .dashicons {
    font-size: 20px;
}

.iyg-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 93px;
    gap: 8px;
}

.iyg-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.iyg-social-btn .dashicons {
    font-size: 20px;
    line-height: 1;
}

.iyg-social-btn.facebook {
    background-color: #1877f2;
    color: white;
}

.iyg-social-btn.facebook:hover {
    background-color: #166fe5;
    color: white;
}

.iyg-social-btn.email {
    background-color: #28a745;
    color: white;
}

.iyg-social-btn.email:hover {
    background-color: #218838;
    color: white;
}

.iyg-social-btn.copy {
    background-color: #6c757d;
    color: white;
}

.iyg-social-btn.copy:hover {
    background-color: #5a6268;
    color: white;
}

.iyg-social-btn.twitter {
    background-color: #1da1f2;
    color: white;
}

.iyg-social-btn.twitter:hover {
    background-color: #1a91da;
    color: white;
}

.iyg-social-btn.linkedin {
    background-color: #0077b5;
    color: white;
}

.iyg-social-btn.linkedin:hover {
    background-color: #005885;
    color: white;
}

.iyg-social-btn.whatsapp {
    background-color: #25d366;
    color: white;
}

.iyg-social-btn.whatsapp:hover {
    background-color: #20b954;
    color: white;
}

/* Modal Styles */
.iyg-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    animation: fadeIn 0.3s ease-out;
}

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

.iyg-modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

.iyg-modal-close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.iyg-modal-close:hover,
.iyg-modal-close:focus {
    color: #333;
    background-color: #f0f0f0;
    text-decoration: none;
}

.iyg-modal h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Form Styles */
#iyg-share-email-form p {
    margin-bottom: 20px;
}

#iyg-share-email-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#iyg-share-email-form input[type="text"],
#iyg-share-email-form input[type="email"],
#iyg-share-email-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

#iyg-share-email-form input[type="text"]:focus,
#iyg-share-email-form input[type="email"]:focus,
#iyg-share-email-form textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#iyg-share-email-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Button Styles */
#iyg-share-email-form .button {
    margin-right: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    min-width: 100px;
}

#iyg-share-email-form .button.alt {
    background-color: #007cba;
    color: white;
}

#iyg-share-email-form .button.alt:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

#iyg-share-email-form .button:not(.alt) {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

#iyg-share-email-form .button:not(.alt):hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

#iyg-share-email-form .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Message Styles */
#iyg-share-email-messages {
    margin-top: 20px;
}

.iyg-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.iyg-message-success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.iyg-message-error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

/* Clipboard Message */
.iyg-clipboard-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 10000;
    max-width: 300px;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .iyg-social-buttons {
        flex-direction: column;
    }
    
    .iyg-social-btn {
        width: 100%;
        justify-content: center;
    }
    
    .iyg-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .iyg-modal-close {
        right: 15px;
        top: 15px;
    }
    
    .iyg-modal h3 {
        font-size: 20px;
        margin-right: 30px;
    }
    
    #iyg-share-email-form .button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .iyg-social-share {
        padding: 15px;
        margin: 15px 0;
    }
    
    .iyg-social-share h3 {
        font-size: 16px;
    }
    
    .iyg-social-btn {
        padding: 12px;
        font-size: 13px;
    }
    
    .iyg-modal-content {
        padding: 15px;
    }
    
    .iyg-modal h3 {
        font-size: 18px;
    }
}

/* High DPI / Retina Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iyg-social-btn .dashicons {
        font-size: 20px;
    }
}

/* Focus Management for Accessibility */
.iyg-modal:focus {
    outline: none;
}

.iyg-modal-content:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}

/* Print Styles */
@media print {
    .iyg-social-share,
    .iyg-modal {
        display: none !important;
    }
}
