/**
 * MagniSnap Frontend Styles
 */

/* Main Section */
.magnisnap-qr-section {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.magnisnap-qr-section h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.magnisnap-intro {
    margin-bottom: 20px;
    font-size: 16px;
    color: #666;
}

/* QR Code Box */
.magnisnap-qr-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.magnisnap-qr-box:last-child {
    margin-bottom: 0;
}

.magnisnap-qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.magnisnap-qr-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.magnisnap-error {
    color: #d63638;
    font-weight: bold;
    padding: 5px 10px;
    background: #fcf0f1;
    border-radius: 4px;
}

/* QR Code Content */
.magnisnap-qr-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    align-items: start;
}

.magnisnap-qr-content.compact {
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .magnisnap-qr-content,
    .magnisnap-qr-content.compact {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.magnisnap-qr-code {
    text-align: center;
}

.magnisnap-qr-code img {
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

/* QR Code Details */
.magnisnap-qr-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.magnisnap-detail {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.magnisnap-detail strong {
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.magnisnap-detail span,
.magnisnap-detail a {
    font-size: 16px;
    color: #333;
}

.magnisnap-session-token {
    font-family: 'Courier New', monospace;
    font-size: 20px !important;
    font-weight: bold;
    color: #2271b1;
    background: #f0f0f1;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.magnisnap-url a {
    color: #2271b1;
    text-decoration: none;
    word-break: break-all;
}

.magnisnap-url a:hover {
    text-decoration: underline;
}

.magnisnap-url .button {
    display: inline-block;
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.magnisnap-url .button:hover {
    background: #135e96;
    text-decoration: none;
}

/* Instructions */
.magnisnap-instructions {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.magnisnap-instructions p {
    margin: 0 0 10px 0;
}

.magnisnap-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.magnisnap-instructions li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Pending State */
.magnisnap-pending {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    text-align: center;
}

.magnisnap-pending p {
    margin: 0 0 10px 0;
    color: #856404;
}

.magnisnap-error-detail {
    font-size: 14px;
    color: #721c24;
    background: #f8d7da;
    padding: 10px;
    border-radius: 4px;
}

/* My Account Compact View */
.magnisnap-my-account .magnisnap-qr-box {
    padding: 15px;
}

.magnisnap-my-account .magnisnap-qr-code img {
    max-width: 180px;
}

.magnisnap-my-account .magnisnap-detail strong {
    font-size: 12px;
}

.magnisnap-my-account .magnisnap-detail span {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 600px) {
    .magnisnap-qr-section {
        padding: 15px;
    }
    
    .magnisnap-qr-box {
        padding: 15px;
    }
    
    .magnisnap-qr-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .magnisnap-session-token {
        font-size: 16px !important;
    }
}
