/**
 * Media & Affiliate Shortcodes - Styles
 * Version: 1.0.0
 */

/* Image Shortcode Styles */
.mas-image-wrapper {
    margin: 20px 0;
    clear: both;
}

.mas-image-wrapper.mas-align-left {
    text-align: left;
}

.mas-image-wrapper.mas-align-center {
    text-align: center;
}

.mas-image-wrapper.mas-align-right {
    text-align: right;
}

.mas-image {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.mas-image.mas-rounded {
    border-radius: 8px;
}

.mas-image.mas-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mas-image.mas-border {
    border: 1px solid #ddd;
    padding: 4px;
}

.mas-caption {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Video Shortcode Styles */
.mas-video-wrapper {
    margin: 20px auto;
    position: relative;
}

.mas-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.mas-video-container iframe,
.mas-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Affiliate Link Styles */
.mas-aff-link {
    color: #0073aa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mas-aff-link:hover {
    color: #005177;
    text-decoration: underline;
}

.mas-aff-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mas-aff-button:hover {
    background-color: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Button Shortcode Styles */
.mas-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    line-height: 1.5;
}

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

/* Button Sizes */
.mas-button-small {
    padding: 8px 16px;
    font-size: 14px;
}

.mas-button-medium {
    padding: 12px 24px;
    font-size: 16px;
}

.mas-button-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* Button Colors */
.mas-button-primary {
    background-color: #0073aa;
    color: #fff !important;
}

.mas-button-primary:hover {
    background-color: #005177;
}

.mas-button-secondary {
    background-color: #6c757d;
    color: #fff !important;
}

.mas-button-secondary:hover {
    background-color: #5a6268;
}

.mas-button-success {
    background-color: #28a745;
    color: #fff !important;
}

.mas-button-success:hover {
    background-color: #218838;
}

.mas-button-danger {
    background-color: #dc3545;
    color: #fff !important;
}

.mas-button-danger:hover {
    background-color: #c82333;
}

.mas-button-warning {
    background-color: #ffc107;
    color: #212529 !important;
}

.mas-button-warning:hover {
    background-color: #e0a800;
}

.mas-button-info {
    background-color: #17a2b8;
    color: #fff !important;
}

.mas-button-info:hover {
    background-color: #138496;
}

/* Full Width Button */
.mas-button-fullwidth {
    display: block;
    width: 100%;
}

/* Button Icon */
.mas-button-icon {
    margin-right: 8px;
}

/* Gallery Shortcode Styles */
.mas-gallery {
    display: grid;
    gap: 15px;
    margin: 20px 0;
}

.mas-gallery-columns-1 {
    grid-template-columns: repeat(1, 1fr);
}

.mas-gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mas-gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mas-gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mas-gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.mas-gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

.mas-gallery-item {
    overflow: hidden;
    border-radius: 4px;
    position: relative;
}

.mas-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.mas-gallery-item a:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .mas-gallery-columns-3,
    .mas-gallery-columns-4,
    .mas-gallery-columns-5,
    .mas-gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .mas-button-fullwidth {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .mas-gallery-columns-2,
    .mas-gallery-columns-3,
    .mas-gallery-columns-4,
    .mas-gallery-columns-5,
    .mas-gallery-columns-6 {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .mas-button {
        display: block;
        width: 100%;
    }
}

/* Modal Styles */
.mas-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.mas-modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mas-modal-header {
    padding: 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.mas-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.mas-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.mas-modal-close:hover,
.mas-modal-close:focus {
    color: #000;
}

.mas-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.mas-shortcode-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.mas-tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.mas-tab-button.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.mas-tab-content {
    display: none;
}

.mas-tab-content.active {
    display: block;
}

.mas-form-group {
    margin-bottom: 15px;
}

.mas-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.mas-form-group input,
.mas-form-group select,
.mas-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.mas-form-group input:focus,
.mas-form-group select:focus,
.mas-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.mas-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.mas-generate-btn {
    background-color: #0073aa;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.mas-generate-btn:hover {
    background-color: #005177;
}

.mas-shortcode-output {
    margin-top: 15px;
    padding: 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
}

.mas-copy-btn {
    margin-top: 10px;
    background-color: #28a745;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.mas-copy-btn:hover {
    background-color: #218838;
}
