/* ==========================
   CSS ESPECÍFICO DA FERRAMENTA
   Prefixo: media-preco-*
   Estilo moderno, interativo e responsivo
   ========================== */
:root{
--media-preco-chart-bar-primary:#0072bc;
--media-preco-chart-bar-secondary:#00a651;
--media-preco-chart-grid:#e9ecef;
--media-preco-chart-axis:#adb5bd;
--media-preco-chart-tick:#495057;
--media-preco-chart-label:#343a40;
--media-preco-chart-placeholder:#6c757d;
}
[data-theme="dark"]{
--media-preco-chart-bar-primary:#5ac8fa;
--media-preco-chart-bar-secondary:#4cd964;
--media-preco-chart-grid:#495057;
--media-preco-chart-axis:#6c757d;
--media-preco-chart-tick:#adb5bd;
--media-preco-chart-label:#e9ecef;
--media-preco-chart-placeholder:#adb5bd;
}
.media-preco-container{max-width:900px;margin:0 auto;padding:0;display:grid;gap:20px;animation:slideInUp 0.6s ease-out;}
@keyframes slideInUp{from{opacity:0;transform:translateY(30px);}to{opacity:1;transform:translateY(0);}}
.media-preco-card{background:#ffffff;border:1px solid #e9ecef;border-radius:16px;padding:24px;box-shadow:0 4px 12px rgba(0,0,0,0.08);transition:all 0.3s ease;position:relative;overflow:hidden;}
.media-preco-card:hover{transform:translateY(-2px);box-shadow:0 8px 25px rgba(0,0,0,0.12);}
.media-preco-card h3{font-size:1.2rem;margin:0 0 16px 0;color:#343a40;font-weight:600;display:flex;align-items:center;gap:8px;}
[data-theme="dark"] .media-preco-card{background:#2d2d2d;border:1px solid #495057;box-shadow:0 4px 12px rgba(0,0,0,0.3);}
[data-theme="dark"] .media-preco-card:hover{box-shadow:0 8px 25px rgba(0,0,0,0.4);}
[data-theme="dark"] .media-preco-card h3{color:#e9ecef;}
.media-preco-field{display:flex;flex-direction:column;gap:6px;}
.media-preco-field label{font-size:0.95rem;color:#343a40;font-weight:500;margin-bottom:4px;}
.media-preco-field input,.media-preco-field select{padding:12px 16px;border:2px solid #e9ecef;border-radius:8px;font-size:1rem;background:#ffffff;transition:all 0.3s ease;color:#343a40;}
.media-preco-field input:focus,.media-preco-field select:focus{outline:none;border-color:#00a651;box-shadow:0 0 0 3px rgba(0,166,81,0.1);background:#fefffe;}
.media-preco-field input::placeholder{color:#6c757d;font-style:italic;}
[data-theme="dark"] .media-preco-field label{color:#e9ecef;}
[data-theme="dark"] .media-preco-field input,[data-theme="dark"] .media-preco-field select{border:2px solid #495057;background:#1a1a1a;color:#e9ecef;}
[data-theme="dark"] .media-preco-field input:focus,[data-theme="dark"] .media-preco-field select:focus{border-color:#4cd964;box-shadow:0 0 0 3px rgba(76,217,100,0.2);background:#212121;}
[data-theme="dark"] .media-preco-field input::placeholder{color:#adb5bd;}
.media-preco-pref-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:end;}
.media-preco-actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;}
.media-preco-actions button,.media-preco-add button{padding:12px 20px;border:none;border-radius:8px;cursor:pointer;font-weight:600;font-size:14px;transition:all 0.3s ease;display:inline-flex;align-items:center;gap:8px;position:relative;overflow:hidden;font-family:inherit;min-height:44px;}
.media-preco-actions button:hover,.media-preco-add button:hover{transform:translateY(-1px);}
.media-preco-actions button:active,.media-preco-add button:active{transform:translateY(0);}
.media-preco-actions button[disabled]{opacity:0.5;cursor:not-allowed;transform:none;box-shadow:none;}
.media-preco-actions button[disabled]:hover,.media-preco-add button[disabled]:hover{transform:none !important;box-shadow:none !important;}
.media-preco-actions button#calc{background:linear-gradient(135deg,#28a745 0%,#20c997 100%);color:#ffffff;box-shadow:0 2px 8px rgba(40,167,69,0.3);}
.media-preco-actions button#calc:hover{background:linear-gradient(135deg,#20c997 0%,#17a2b8 100%);box-shadow:0 4px 12px rgba(40,167,69,0.4);}
.media-preco-actions button#clear{background:linear-gradient(135deg,#dc3545 0%,#c82333 100%);color:#ffffff;box-shadow:0 2px 8px rgba(220,53,69,0.3);}
.media-preco-actions button#clear:hover{background:linear-gradient(135deg,#c82333 0%,#bd2130 100%);box-shadow:0 4px 12px rgba(220,53,69,0.4);}
.media-preco-add button{background:linear-gradient(135deg,#0072bc 0%,#3399ff 100%);color:#ffffff;box-shadow:0 2px 8px rgba(0,114,188,0.3);}
.media-preco-add button:hover{background:linear-gradient(135deg,#0d6efd 0%,#1ea7fd 100%);box-shadow:0 4px 12px rgba(0,114,188,0.4);}
.media-preco-actions button#copy-result{background:linear-gradient(135deg,#0d6efd 0%,#1ea7fd 100%);color:#ffffff;box-shadow:0 2px 8px rgba(13,110,253,0.3);}
.media-preco-actions button#copy-result:hover{background:linear-gradient(135deg,#1ea7fd 0%,#39c0ed 100%);box-shadow:0 4px 12px rgba(13,110,253,0.4);}
.media-preco-actions button#copy-report{background:linear-gradient(135deg,#6f42c1 0%,#8a63d2 100%);color:#ffffff;box-shadow:0 2px 8px rgba(111,66,193,0.3);}
.media-preco-actions button#copy-report:hover{background:linear-gradient(135deg,#8a63d2 0%,#a47ae0 100%);box-shadow:0 4px 12px rgba(111,66,193,0.4);}
.media-preco-actions button:focus-visible,.media-preco-add button:focus-visible,.media-preco-row .btn-remove:focus-visible{outline:2px solid #00a651;outline-offset:2px;box-shadow:0 0 0 3px rgba(0,166,81,0.2)}
[data-theme="dark"] .media-preco-actions button:focus-visible,[data-theme="dark"] .media-preco-add button:focus-visible,[data-theme="dark"] .media-preco-row .btn-remove:focus-visible{outline:2px solid #4cd964;box-shadow:0 0 0 3px rgba(76,217,100,0.3)}
.media-preco-rows{display:grid;gap:12px;margin:16px 0;}
.media-preco-row{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:end;padding:16px;background:#f8f9fa;border-radius:12px;transition:all 0.3s ease;animation:fadeInDown 0.4s ease-out;border:1px solid #e9ecef;}
@keyframes fadeInDown{from{opacity:0;transform:translateY(-10px);}to{opacity:1;transform:translateY(0);}}
.media-preco-row:hover{background:#e9ecef;transform:translateX(2px);}
[data-theme="dark"] .media-preco-row{background:#212121;border:1px solid #495057;}
[data-theme="dark"] .media-preco-row:hover{background:#2d2d2d;}
.media-preco-row .media-preco-remove{align-self:center;}
.media-preco-row .btn-remove{padding:8px 12px;border:2px solid #dc3545;border-radius:8px;background:#ffffff;color:#dc3545;cursor:pointer;font-weight:600;font-size:0.85rem;transition:all 0.3s ease;display:inline-flex;align-items:center;gap:6px;}
.media-preco-row .btn-remove:hover{background:#dc3545;color:#ffffff;box-shadow:0 4px 12px rgba(220,53,69,0.3);}
.media-preco-row .btn-remove:hover::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");}
[data-theme="dark"] .media-preco-row .btn-remove{border:2px solid #ff4757;background:#1a1a1a;color:#ff4757;}
[data-theme="dark"] .media-preco-row .btn-remove:hover{background:#ff4757;color:#ffffff;}
.media-preco-result{display:grid;gap:12px;}
.media-preco-result .media-preco-output{border:2px solid #e9ecef;border-radius:12px;padding:16px;background:linear-gradient(135deg,#f8f9fa 0%,#ffffff 100%);font-weight:500;color:#343a40;transition:all 0.3s ease;position:relative;overflow:hidden;}
.media-preco-chart{margin-top:16px;background:#ffffff;border:1px solid #e9ecef;border-radius:12px;padding:12px;box-shadow:0 2px 8px rgba(0,0,0,0.05);}
[data-theme="dark"] .media-preco-result .media-preco-output{border:2px solid #495057;background:linear-gradient(135deg,#212121 0%,#2d2d2d 100%);color:#e9ecef;}
[data-theme="dark"] .media-preco-chart{background:#2d2d2d;border:1px solid #495057;box-shadow:0 2px 8px rgba(0,0,0,0.3);}
.media-preco-chart canvas{width:100%;height:auto;display:block;}
.media-preco-chart-legend{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:8px;font-size:0.9rem;color:#343a40;}
.media-preco-legend-item{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid #e9ecef;border-radius:8px;background:#f8f9fa;}
.media-preco-legend-dot{width:10px;height:10px;border-radius:50%;display:inline-block;}
[data-theme="dark"] .media-preco-chart-legend{color:#e9ecef;}
[data-theme="dark"] .media-preco-legend-item{border:1px solid #495057;background:#212121;}
.media-preco-result .media-preco-output:hover{border-color:#00a651;background:linear-gradient(135deg,#fefffe 0%,#f8fffe 100%);transform:translateY(-1px);}
.media-preco-muted{font-size:0.85rem;color:#6c757d;font-style:italic;}
[data-theme="dark"] .media-preco-result .media-preco-output:hover{border-color:#4cd964;background:linear-gradient(135deg,#212121 0%,#2d2d2d 100%);}
[data-theme="dark"] .media-preco-muted{color:#adb5bd;}
.media-preco-actions button::before,.media-preco-add button::before{content:'';width:16px;height:16px;display:inline-block;background-size:contain;background-repeat:no-repeat;background-position:center;}
.media-preco-actions button#calc::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cline x1='8' y1='6' x2='16' y2='6'/%3E%3Cline x1='8' y1='10' x2='16' y2='10'/%3E%3Cline x1='8' y1='14' x2='12' y2='14'/%3E%3Cline x1='8' y1='18' x2='12' y2='18'/%3E%3C/svg%3E");}
.media-preco-actions button#clear::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6'/%3E%3Cpath d='M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2'/%3E%3C/svg%3E");}
.media-preco-add button::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E");}
.media-preco-actions button#copy-result::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Crect x='2' y='2' width='13' height='13' rx='2'/%3E%3C/svg%3E");}
.media-preco-actions button#copy-report::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M4 4h11l5 5v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cline x1='8' y1='13' x2='16' y2='13'/%3E%3Cline x1='8' y1='17' x2='16' y2='17'/%3E%3C/svg%3E");}
.media-preco-row .btn-remove::before{content:'';width:14px;height:14px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat;background-position:center;}
@media (max-width:768px){
.media-preco-container{gap:16px;padding:0 16px;}
.media-preco-card{padding:20px;border-radius:12px;}
.media-preco-card h3{font-size:1.1rem;}
.media-preco-pref-grid,.media-preco-row{grid-template-columns:1fr;gap:12px;}
.media-preco-actions{flex-direction:column;align-items:stretch;}
.media-preco-actions button,.media-preco-add button{width:100%;justify-content:center;padding:12px 16px;}
.media-preco-field input,.media-preco-field select{padding:10px 12px;font-size:0.95rem;}
}
@media (max-width:480px){
.media-preco-container{padding:0 12px;}
.media-preco-card{padding:16px;}
.media-preco-actions button,.media-preco-add button{padding:10px 16px;font-size:0.9rem;}
.media-preco-row{padding:12px;}
}
@media (prefers-reduced-motion:reduce){
*{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;}
}
